aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-16 19:44:50 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-17 13:27:20 +0200
commitcabcd8ff66ef2435e0c99b6e2e8190e72c8c9a96 (patch)
treee76e8a1035e744911403a51fd9cd4052f72cf641
parent4f3e2f107b6315ae4ea74799c2a6314ded3b595d (diff)
downloadffmpeg-cabcd8ff66ef2435e0c99b6e2e8190e72c8c9a96.tar.gz
avformat/movenchint: use av_freep() for safety
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/movenchint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c
index 2602254be9..006aa09f62 100644
--- a/libavformat/movenchint.c
+++ b/libavformat/movenchint.c
@@ -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;