changeset 31726:8adcdb0b8ef6

Remove useless NULL checks before freeing and NULL pointers to freed memory.
author reimar
date Sat, 24 Jul 2010 21:43:29 +0000
parents 8e850ff84b27
children 94ba361e1766
files spudec.c
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/spudec.c	Sat Jul 24 21:40:06 2010 +0000
+++ b/spudec.c	Sat Jul 24 21:43:29 2010 +0000
@@ -1265,13 +1265,16 @@
   if (spu) {
     while (spu->queue_head)
       spudec_free_packet(spudec_dequeue_packet(spu));
-    if (spu->packet)
-      free(spu->packet);
-    if (spu->scaled_image)
-	free(spu->scaled_image);
-    if (spu->image)
-      free(spu->image);
+    free(spu->packet);
+    spu->packet = NULL;
+    free(spu->scaled_image);
+    spu->scaled_image = NULL;
+    free(spu->image);
+    spu->image = NULL;
+    spu->aimage = NULL;
     free(spu->pal_image);
+    spu->pal_image = NULL;
+    spu->image_size = 0;
     free(spu);
   }
 }