diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-05-05 21:14:32 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-05-15 01:26:07 +0200 |
commit | 70fa44dfa84acec6bfa94dead95e133d7fd7cd24 (patch) | |
tree | 75c1cd3ac147c173ff39e25471639ffac6eeda5a | |
parent | b18aaf209f007e67ac4490ba5647ea139d1a6dcb (diff) | |
download | ffmpeg-70fa44dfa84acec6bfa94dead95e133d7fd7cd24.tar.gz |
avcodec/vulkan_encode_h264: Fix memleak on error
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/vulkan_encode_h264.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/vulkan_encode_h264.c b/libavcodec/vulkan_encode_h264.c index ecbb125420..f31b6d4069 100644 --- a/libavcodec/vulkan_encode_h264.c +++ b/libavcodec/vulkan_encode_h264.c @@ -1065,7 +1065,7 @@ static int parse_feedback_units(AVCodecContext *avctx, if (err < 0) { av_log(avctx, AV_LOG_ERROR, "Unable to parse feedback units, bad drivers: %s\n", av_err2str(err)); - return err; + goto fail; } /* If PPS has an override, just copy it entirely. */ @@ -1079,10 +1079,12 @@ static int parse_feedback_units(AVCodecContext *avctx, } } + err = 0; +fail: ff_cbs_fragment_free(&au); ff_cbs_close(&cbs); - return 0; + return err; } static int init_base_units(AVCodecContext *avctx) |