diff mbox series

[FFmpeg-devel,3/5] hwcontext_vulkan: call ff_vk_uninit() on device uninit

Message ID NXmyvDO--3-9@lynne.ee
State New
Headers show
Series [FFmpeg-devel,RFC,1/5] hwcontext: add a new AVHWFramesContext.opaque field | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/configure_x86 warning Failed to apply patch

Commit Message

Lynne June 13, 2023, 4:20 a.m. UTC
This fixes three memory leaks from ff_vk_load_props().
Does not depend on any other patches.

Patch attached.
diff mbox series

Patch

From 75945869e8341058edd1fca72b9ccf46d0086ddc Mon Sep 17 00:00:00 2001
From: Lynne <dev@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