You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
fftools/ffmpeg_filter: fix leak of AVIOContext in read_binary()
It was only being freed on failure. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -408,11 +408,13 @@ static int read_binary(const char *path, uint8_t **data, int *len)
|
|||||||
|
|
||||||
*len = fsize;
|
*len = fsize;
|
||||||
|
|
||||||
return 0;
|
ret = 0;
|
||||||
fail:
|
fail:
|
||||||
avio_close(io);
|
avio_close(io);
|
||||||
|
if (ret < 0) {
|
||||||
av_freep(data);
|
av_freep(data);
|
||||||
*len = 0;
|
*len = 0;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user