You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/libx264: Fix leak in case of allocation failure
Fixes Coverity issue #1518906. Reviewed-by: Anton Khirnov <anton@khirnov.net> Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -503,6 +503,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
if (sei_data) {
|
if (sei_data) {
|
||||||
pic->extra_sei.payloads = av_mallocz(sizeof(pic->extra_sei.payloads[0]));
|
pic->extra_sei.payloads = av_mallocz(sizeof(pic->extra_sei.payloads[0]));
|
||||||
if (pic->extra_sei.payloads == NULL) {
|
if (pic->extra_sei.payloads == NULL) {
|
||||||
|
av_free(sei_data);
|
||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user