From: Jean-Philippe Bruyère Date: Tue, 19 Dec 2017 16:20:36 +0000 (+0100) Subject: init vkhimage structure with calloc X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=ac96dea618265f8764197ecb8e197b43e68f5fec;p=jp%2Fvkhelpers.git init vkhimage structure with calloc --- diff --git a/vkh_image.c b/vkh_image.c index 40fa611..bcf70c9 100644 --- a/vkh_image.c +++ b/vkh_image.c @@ -7,7 +7,7 @@ VkhImage _vkh_image_create (VkhDevice pDev, VkImageType imageType, VkSampleCountFlagBits samples, VkImageTiling tiling, uint32_t mipLevels, uint32_t arrayLayers, VkImageLayout layout){ - VkhImage img = (VkhImage)malloc(sizeof(vkh_image_t)); + VkhImage img = (VkhImage)calloc(1,sizeof(vkh_image_t)); img->pDev = pDev; img->width = width;