summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-03-12 22:51:06 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-03-14 07:16:51 +0100
commitf456c192d99019ff7f0587abb7a4802a1d7ba102 (patch)
treef69aa57fe6867e2449b4800dd41ddc4d6699d940 /libavcodec/libx264.c
parent2732d0507c5ee6961d49212e71717fc4fbc72d16 (diff)
downloadffmpeg-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.c1
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;
}