SDL: GPU Metal: Fix uninitialized memory

From 00708b976a263238c5e29426bebe3adc0ef82c7b Mon Sep 17 00:00:00 2001
From: Jan Sedivy <[EMAIL REDACTED]>
Date: Sat, 31 Aug 2024 15:31:50 +0200
Subject: [PATCH] GPU Metal: Fix uninitialized memory

---
 src/gpu/metal/SDL_gpu_metal.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gpu/metal/SDL_gpu_metal.m b/src/gpu/metal/SDL_gpu_metal.m
index 6a75322c5d903..7e44bfb0d56fa 100644
--- a/src/gpu/metal/SDL_gpu_metal.m
+++ b/src/gpu/metal/SDL_gpu_metal.m
@@ -3407,7 +3407,7 @@ static bool METAL_ClaimWindow(
         MetalWindowData *windowData = METAL_INTERNAL_FetchWindowData(window);
 
         if (windowData == NULL) {
-            windowData = (MetalWindowData *)SDL_malloc(sizeof(MetalWindowData));
+            windowData = (MetalWindowData *)SDL_calloc(1, sizeof(MetalWindowData));
             windowData->window = window;
 
             if (METAL_INTERNAL_CreateSwapchain(renderer, windowData, SDL_GPU_SWAPCHAINCOMPOSITION_SDR, SDL_GPU_PRESENTMODE_VSYNC)) {