From 6b0c1f11c193257b00ae0dc2999a2a2bb48378ae Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Sun, 3 Nov 2024 15:27:14 -0700 Subject: [PATCH] fix small memory leak --- client/src/gpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/gpu.c b/client/src/gpu.c index 087f9b9..879043e 100644 --- a/client/src/gpu.c +++ b/client/src/gpu.c @@ -332,6 +332,7 @@ VkResult create_logical_device( } } } + free(queue_families); if(graphics_queue->family == 0xFFFFFFFF || present_queue->family == 0xFFFFFFFF || transfer_queue->family == 0xFFFFFFFF) { return VK_ERROR_INITIALIZATION_FAILED; @@ -1348,6 +1349,8 @@ VkResult recreate_framebuffer(RenderContext* gpu) { free(gpu->swapchain_images); free(gpu->swapchain_image_views); free(gpu->swapchain_framebuffers); + free(gpu->swapchain_details.formats); + free(gpu->swapchain_details.present_modes); VK_RESULT(get_swapchain_details( gpu->physical_device,