From 40b028ebce628b2faa9ffdbb0f4c86c751c8d9be Mon Sep 17 00:00:00 2001
From: Francisco Javier Trujillo Mata <fjtrujy@gmail.com>
Date: Sun, 11 Nov 2018 17:14:39 +0100
Subject: [PATCH] Replace malloc for calloc in the  ps2_gfx

---
 gfx/drivers/ps2_gfx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gfx/drivers/ps2_gfx.c b/gfx/drivers/ps2_gfx.c
index 45f67c28c8..a25c9c8239 100644
--- a/gfx/drivers/ps2_gfx.c
+++ b/gfx/drivers/ps2_gfx.c
@@ -66,10 +66,7 @@ static GSGLOBAL *init_GSGlobal(void) {
 }
 
 static GSTEXTURE * prepare_new_texture(void) {
-      GSTEXTURE *texture = malloc(sizeof *texture);
-      texture->Width = 0;
-      texture->Height = 0;
-      texture->Mem = NULL;
+      GSTEXTURE *texture = calloc(1, sizeof(*texture));
       return texture;
 }