From 14f225198d8ca33fd77786fcd8d38638185454fa Mon Sep 17 00:00:00 2001 From: Northfear <11291116+Northfear@users.noreply.github.com> Date: Sun, 26 Sep 2021 18:11:22 +0300 Subject: [PATCH] Use SDL_calloc for allocation of gxm_texture --- src/render/vitagxm/SDL_render_vita_gxm_tools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/vitagxm/SDL_render_vita_gxm_tools.c b/src/render/vitagxm/SDL_render_vita_gxm_tools.c index 8d5ed5a1f..08c361106 100644 --- a/src/render/vitagxm/SDL_render_vita_gxm_tools.c +++ b/src/render/vitagxm/SDL_render_vita_gxm_tools.c @@ -1011,7 +1011,7 @@ gxm_texture_get_datap(const gxm_texture *texture) gxm_texture * create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, SceGxmTextureFormat format, unsigned int isRenderTarget) { - gxm_texture *texture = SDL_malloc(sizeof(gxm_texture)); + gxm_texture *texture = SDL_calloc(1, sizeof(gxm_texture)); const int tex_size = ((w + 7) & ~ 7) * h * tex_format_to_bytespp(format); void *texture_data;