From ac96dea618265f8764197ecb8e197b43e68f5fec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Tue, 19 Dec 2017 17:20:36 +0100 Subject: [PATCH] init vkhimage structure with calloc --- vkh_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3