diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-11-07 12:47:40 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-08 18:05:12 +0200 |
commit | 12d3e0df9980822282f70dffad148b729dbee541 (patch) | |
tree | d298b2c8f5039eae7aeeb16dfd927bea0efcc134 /spudec.c | |
parent | af4b23cd36cff0dc34cde59c6a154fd080d11216 (diff) | |
download | mpv-12d3e0df9980822282f70dffad148b729dbee541.tar.bz2 mpv-12d3e0df9980822282f70dffad148b729dbee541.tar.xz |
cleanup: don't check for NULL before free()
patch by Clément Bœsch, ubitux gmail com
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'spudec.c')
-rw-r--r-- | spudec.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -146,8 +146,7 @@ static packet_t *spudec_dequeue_packet(spudec_handle_t *this) static void spudec_free_packet(packet_t *packet) { - if (packet->packet != NULL) - free(packet->packet); + free(packet->packet); free(packet); } @@ -609,8 +608,7 @@ void spudec_assemble(void *this, unsigned char *packet, unsigned int len, int pt unsigned int len2 = get_be16(packet); // Start new fragment if (spu->packet_reserve < len2) { - if (spu->packet != NULL) - free(spu->packet); + free(spu->packet); spu->packet = malloc(len2); spu->packet_reserve = spu->packet != NULL ? len2 : 0; } |