diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkbuffermemory.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkbuffermemory.c index cf4040fd7f..8688582009 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkbuffermemory.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkbuffermemory.c @@ -271,6 +271,8 @@ _vk_buffer_mem_free (GstAllocator * allocator, GstMemory * memory) if (mem->buffer && !mem->wrapped) vkDestroyBuffer (mem->device->device, mem->buffer, NULL); + gst_clear_object (&mem->barrier.parent.queue); + if (mem->vk_mem) gst_memory_unref ((GstMemory *) mem->vk_mem); diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkimagememory.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkimagememory.c index de22939a13..8db32a6973 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkimagememory.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkimagememory.c @@ -366,6 +366,8 @@ _vk_image_mem_free (GstAllocator * allocator, GstMemory * memory) if (mem->image && !mem->wrapped) vkDestroyImage (mem->device->device, mem->image, NULL); + gst_clear_object (&mem->barrier.parent.queue); + if (mem->vk_mem) gst_memory_unref ((GstMemory *) mem->vk_mem);