mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
examples/avio_reading: fix null dereference on error
Fixed CID1197052 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1fec720afa
commit
419800acc4
@ -119,8 +119,10 @@ int main(int argc, char *argv[])
|
||||
end:
|
||||
avformat_close_input(&fmt_ctx);
|
||||
/* note: the internal buffer could have changed, and be != avio_ctx_buffer */
|
||||
if (avio_ctx) {
|
||||
av_freep(&avio_ctx->buffer);
|
||||
av_freep(&avio_ctx);
|
||||
}
|
||||
av_file_unmap(buffer, buffer_size);
|
||||
|
||||
if (ret < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user