simplify free()+set to NULL using av_freep()
authorAurelien Jacobs <aurel@gnuage.org>
Mon, 20 Nov 2006 00:04:08 +0000 (00:04 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Mon, 20 Nov 2006 00:04:08 +0000 (00:04 +0000)
Originally committed as revision 7127 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/matroska.c

index 7eca05b9b050a68c6a901464ddff72c2fd6604eb..0f71b287bcee1c2ac771494921a1809355fd6f7c 100644 (file)
@@ -988,8 +988,7 @@ matroska_deliver_packet (MatroskaDemuxContext *matroska,
                 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;