mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 10:22:10 +00: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:
parent
af8be7bf43
commit
1b7c13e1a4
@ -408,11 +408,13 @@ static int read_binary(const char *path, uint8_t **data, int *len)
|
||||
|
||||
*len = fsize;
|
||||
|
||||
return 0;
|
||||
ret = 0;
|
||||
fail:
|
||||
avio_close(io);
|
||||
av_freep(data);
|
||||
*len = 0;
|
||||
if (ret < 0) {
|
||||
av_freep(data);
|
||||
*len = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user