changeset 1530:f65cd8910a5c libavformat

simplify free()+set to NULL using av_freep()
author aurel
date Mon, 20 Nov 2006 00:04:08 +0000
parents 07898e88c5b9
children b9caa8a8d77d
files matroska.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/matroska.c	Sun Nov 19 05:32:22 2006 +0000
+++ b/matroska.c	Mon Nov 20 00:04:08 2006 +0000
@@ -988,8 +988,7 @@
                 av_realloc(matroska->packets, (matroska->num_packets - 1) *
                            sizeof(AVPacket *));
         } else {
-            av_free(matroska->packets);
-            matroska->packets = NULL;
+            av_freep(&matroska->packets);
         }
         matroska->num_packets--;
         return 0;