diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-07 04:29:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-07 04:29:27 +0200 |
commit | 0026c4ecfd7b122eb6d296e081747887676449f9 (patch) | |
tree | b820858be6d555bbc1f6a0918bbe47c47e788814 /libavformat | |
parent | f0d1b3acdfb8fc61005d19d13350b7fa1bd19a6f (diff) | |
download | ffmpeg-0026c4ecfd7b122eb6d296e081747887676449f9.tar.gz |
avformat/hls: use av_freep(), do not leave stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/hls.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c index 0c86461f0f..e7bbdfda0a 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -193,9 +193,9 @@ static void free_segment_list(struct playlist *pls) { int i; for (i = 0; i < pls->n_segments; i++) { - av_free(pls->segments[i]->key); - av_free(pls->segments[i]->url); - av_free(pls->segments[i]); + av_freep(&pls->segments[i]->key); + av_freep(&pls->segments[i]->url); + av_freep(&pls->segments[i]); } av_freep(&pls->segments); pls->n_segments = 0; @@ -212,7 +212,7 @@ static void free_playlist_list(HLSContext *c) av_dict_free(&pls->id3_initial); ff_id3v2_free_extra_meta(&pls->id3_deferred_extra); av_free_packet(&pls->pkt); - av_free(pls->pb.buffer); + av_freep(&pls->pb.buffer); if (pls->input) ffurl_close(pls->input); if (pls->ctx) { @@ -243,7 +243,7 @@ static void free_rendition_list(HLSContext *c) { int i; for (i = 0; i < c->n_renditions; i++) - av_free(c->renditions[i]); + av_freep(&c->renditions[i]); av_freep(&c->renditions); c->n_renditions = 0; } |