Skip to content

Commit

Permalink
Fix memory leak in VkUpload (KhronosGroup#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
bin authored Jul 21, 2021
1 parent 3524ae3 commit 4a7aa8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/vkloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,8 @@ ktxTexture_VkUploadEx(ktxTexture* This, ktxVulkanDeviceInfo* vdi,
numCopyRegions, copyRegions
);

free(copyRegions);

if (This->generateMipmaps) {
generateMipmaps(vkTexture, vdi,
blitFilter, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
Expand Down

0 comments on commit 4a7aa8b

Please sign in to comment.