From e3e2fa63e02a88929ec49ba608fad67ae98e85f1 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Sun, 29 Oct 2023 10:22:57 +1100 Subject: [PATCH] fix double free --- librashader-runtime-vk/src/memory.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/librashader-runtime-vk/src/memory.rs b/librashader-runtime-vk/src/memory.rs index e775ef2..d7c783f 100644 --- a/librashader-runtime-vk/src/memory.rs +++ b/librashader-runtime-vk/src/memory.rs @@ -186,9 +186,6 @@ impl Drop for RawVulkanBuffer { fn drop(&mut self) { unsafe { ManuallyDrop::drop(&mut self.buffer); - if self.buffer.handle != vk::Buffer::null() { - self.buffer.device.destroy_buffer(self.buffer.handle, None); - } } } }