This fixes three memory leaks from ff_vk_load_props().
Does not depend on any other patches.

Patch attached.

>From 75945869e8341058edd1fca72b9ccf46d0086ddc Mon Sep 17 00:00:00 2001
From: Lynne <d...@lynne.ee>
Date: Tue, 13 Jun 2023 04:35:29 +0200
Subject: [PATCH 3/5] hwcontext_vulkan: call ff_vk_uninit() on device uninit

This fixes three memory leaks from ff_vk_load_props().
---
 libavutil/hwcontext_vulkan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 1132a61390..c86229ba65 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -1176,6 +1176,8 @@ static void vulkan_device_free(AVHWDeviceContext *ctx)
 
     RELEASE_PROPS(hwctx->enabled_inst_extensions, hwctx->nb_enabled_inst_extensions);
     RELEASE_PROPS(hwctx->enabled_dev_extensions, hwctx->nb_enabled_dev_extensions);
+
+    ff_vk_uninit(&p->vkctx);
 }
 
 static int vulkan_device_create_internal(AVHWDeviceContext *ctx,
-- 
2.40.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to