From 057c3602e9ef5564a7da4f35f9d28a8e15af9c20 Mon Sep 17 00:00:00 2001
From: ImThour <[EMAIL REDACTED]>
Date: Tue, 18 Feb 2025 04:53:36 +0530
Subject: [PATCH] Removing Double-free Issue
---
src/video/windows/SDL_windowsmouse.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/video/windows/SDL_windowsmouse.c b/src/video/windows/SDL_windowsmouse.c
index e27c4c1857ae5..3d6bcc4297823 100644
--- a/src/video/windows/SDL_windowsmouse.c
+++ b/src/video/windows/SDL_windowsmouse.c
@@ -418,10 +418,6 @@ static HCURSOR GetCachedCursor(SDL_Cursor *cursor)
entry = (CachedCursor *)SDL_malloc(sizeof(*entry));
if (!entry) {
- if (hcursor) {
- DestroyCursor(hcursor);
- }
- SDL_free(entry);
goto error;
}
entry->cursor = hcursor;