diff options
author | Lynne <dev@lynne.ee> | 2021-11-13 00:40:46 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2021-11-13 00:40:46 +0100 |
commit | 0d1992e0255ab5cdc026e9190f7b7a114bdeef74 (patch) | |
tree | dbf25ca609f4b8b01fb25f9877f31a4c996aefcf /libavutil/hwcontext_vulkan.c | |
parent | 015b487777cc3bd540f7d77e7ce902a3ab4a7239 (diff) | |
download | ffmpeg-0d1992e0255ab5cdc026e9190f7b7a114bdeef74.tar.gz |
hwcontext_vulkan: close exported memory FD on CUDA import error
Prevents resource leakage.
Diffstat (limited to 'libavutil/hwcontext_vulkan.c')
-rw-r--r-- | libavutil/hwcontext_vulkan.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 0dbbb9d12f..c95c08ff52 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -2676,6 +2676,7 @@ static int vulkan_export_to_cuda(AVHWFramesContext *hwfc, ret = CHECK_CU(cu->cuImportExternalMemory(&dst_int->ext_mem[i], &ext_desc)); if (ret < 0) { + close(ext_desc.handle.fd); err = AVERROR_EXTERNAL; goto fail; } |