Browse Source

avformat/hlsproto: Use av_freep, to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 10 years ago
parent
commit
59ca6e2586
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/hlsproto.c

+ 2
- 2
libavformat/hlsproto.c View 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;
}


Loading…
Cancel
Save