diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-24 13:00:03 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-24 13:14:07 +0100 |
commit | 82d1abc44c5e46f8d64a62dc153ea5ece7ac202b (patch) | |
tree | 95f11928155f2562b064fa49c42c80c04244ab68 /libavformat | |
parent | bed78064f4a884308ae02aaddc009d388124a574 (diff) | |
download | ffmpeg-82d1abc44c5e46f8d64a62dc153ea5ece7ac202b.tar.gz |
avformat/seek: use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/seek.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/seek.c b/libavformat/seek.c index 2368b5e5b9..6a38ba79e5 100644 --- a/libavformat/seek.c +++ b/libavformat/seek.c @@ -470,8 +470,8 @@ void ff_restore_parser_state(AVFormatContext *s, AVParserState *state) st->probe_packets = ss->probe_packets; } - av_free(state->stream_states); - av_free(state); + av_freep(&state->stream_states); + av_freep(&state); } static void free_packet_list(AVPacketList *pktl) @@ -503,6 +503,6 @@ void ff_free_parser_state(AVFormatContext *s, AVParserState *state) free_packet_list(state->parse_queue); free_packet_list(state->raw_packet_buffer); - av_free(state->stream_states); - av_free(state); + av_freep(&state->stream_states); + av_freep(&state); } |