mirror of https://github.com/mpv-player/mpv
spudec.c: Remove useless NULL checks before free()
Also set pointers to NULL after freeing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31792 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a5e9d3b56a
commit
37097806be
15
spudec.c
15
spudec.c
|
@ -1265,13 +1265,16 @@ void spudec_free(void *this)
|
||||||
if (spu) {
|
if (spu) {
|
||||||
while (spu->queue_head)
|
while (spu->queue_head)
|
||||||
spudec_free_packet(spudec_dequeue_packet(spu));
|
spudec_free_packet(spudec_dequeue_packet(spu));
|
||||||
if (spu->packet)
|
free(spu->packet);
|
||||||
free(spu->packet);
|
spu->packet = NULL;
|
||||||
if (spu->scaled_image)
|
free(spu->scaled_image);
|
||||||
free(spu->scaled_image);
|
spu->scaled_image = NULL;
|
||||||
if (spu->image)
|
free(spu->image);
|
||||||
free(spu->image);
|
spu->image = NULL;
|
||||||
|
spu->aimage = NULL;
|
||||||
free(spu->pal_image);
|
free(spu->pal_image);
|
||||||
|
spu->pal_image = NULL;
|
||||||
|
spu->image_size = 0;
|
||||||
free(spu);
|
free(spu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue