mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-02 03:06:28 +02:00
avformat/seek: use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
bed78064f4
commit
82d1abc44c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user