Skip to content

Commit

Permalink
Fix memory leak in VkUpload (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
bin authored Jul 21, 2021
1 parent 13f1741 commit 2b2b48f
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 2b2b48f

Please sign in to comment.