diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-05-05 22:16:13 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-05-15 01:51:28 +0200 |
commit | d794ecd9d2d2bd3ebcdeb4c033fd5d9ae85cdfc4 (patch) | |
tree | 5173bf24a026439645bf5c035c39f5ccd1c43c43 /libavcodec/vulkan_encode_h265.c | |
parent | 70fa44dfa84acec6bfa94dead95e133d7fd7cd24 (diff) | |
download | ffmpeg-d794ecd9d2d2bd3ebcdeb4c033fd5d9ae85cdfc4.tar.gz |
avcodec/vulkan_encode_hevc: Fix memleak on error
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vulkan_encode_h265.c')
-rw-r--r-- | libavcodec/vulkan_encode_h265.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/vulkan_encode_h265.c b/libavcodec/vulkan_encode_h265.c index a1f9528ac3..d81d2de95a 100644 --- a/libavcodec/vulkan_encode_h265.c +++ b/libavcodec/vulkan_encode_h265.c @@ -1218,7 +1218,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 (sps_override) { @@ -1246,10 +1246,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) |