diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-03-12 22:51:06 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-03-14 07:16:51 +0100 |
commit | f456c192d99019ff7f0587abb7a4802a1d7ba102 (patch) | |
tree | f69aa57fe6867e2449b4800dd41ddc4d6699d940 /libavcodec/libx264.c | |
parent | 2732d0507c5ee6961d49212e71717fc4fbc72d16 (diff) | |
download | ffmpeg-f456c192d99019ff7f0587abb7a4802a1d7ba102.tar.gz |
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>
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r-- | libavcodec/libx264.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index f65ac5dacc..e59939a8a7 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -503,6 +503,7 @@ FF_ENABLE_DEPRECATION_WARNINGS if (sei_data) { pic->extra_sei.payloads = av_mallocz(sizeof(pic->extra_sei.payloads[0])); if (pic->extra_sei.payloads == NULL) { + av_free(sei_data); ret = AVERROR(ENOMEM); goto fail; } |