Commit 82d1abc4 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/seek: use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bed78064
......@@ -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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment