avformat/hlsproto: Use av_freep, to avoid leaving stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 6 Jan 2015 11:52:55 +0000 (12:52 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 6 Jan 2015 14:07:50 +0000 (15:07 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/hlsproto.c

index a569e92..788562a 100644 (file)
@@ -80,7 +80,7 @@ static void free_segment_list(HLSContext *s)
 {
     int i;
     for (i = 0; i < s->n_segments; i++)
-        av_free(s->segments[i]);
+        av_freep(&s->segments[i]);
     av_freep(&s->segments);
     s->n_segments = 0;
 }
@@ -89,7 +89,7 @@ static void free_variant_list(HLSContext *s)
 {
     int i;
     for (i = 0; i < s->n_variants; i++)
-        av_free(s->variants[i]);
+        av_freep(&s->variants[i]);
     av_freep(&s->variants);
     s->n_variants = 0;
 }