avformat/movenchint: use av_freep() for safety
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 16 Aug 2014 17:44:50 +0000 (19:44 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 17 Aug 2014 11:27:20 +0000 (13:27 +0200)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/movenchint.c

index 2602254..006aa09 100644 (file)
@@ -72,7 +72,7 @@ static void sample_queue_pop(HintSampleQueue *queue)
     if (queue->len <= 0)
         return;
     if (queue->samples[0].own_data)
-        av_free(queue->samples[0].data);
+        av_freep(&queue->samples[0].data);
     queue->len--;
     memmove(queue->samples, queue->samples + 1, sizeof(HintSample)*queue->len);
 }
@@ -85,7 +85,7 @@ static void sample_queue_free(HintSampleQueue *queue)
     int i;
     for (i = 0; i < queue->len; i++)
         if (queue->samples[i].own_data)
-            av_free(queue->samples[i].data);
+            av_freep(&queue->samples[i].data);
     av_freep(&queue->samples);
     queue->len  = 0;
     queue->size = 0;