SDL: Fix memory leak in SDL_UpdateSteamVirtualGamepadInfo() (d1b6d)

From d1b6d5f33d55af6c0042679421d4a7e4ede79064 Mon Sep 17 00:00:00 2001
From: meyraud705 <[EMAIL REDACTED]>
Date: Mon, 5 Feb 2024 12:54:23 +0100
Subject: [PATCH] Fix memory leak in SDL_UpdateSteamVirtualGamepadInfo()

(cherry picked from commit 82d89ff4fb1457a9dd75b9023628e75d7279ac57)
(cherry picked from commit a09b0b05eba9d8c5d85a984ee04eebf315a5801a)
---
 src/joystick/SDL_steam_virtual_gamepad.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/joystick/SDL_steam_virtual_gamepad.c b/src/joystick/SDL_steam_virtual_gamepad.c
index c382b991602d..4e5255d05e81 100644
--- a/src/joystick/SDL_steam_virtual_gamepad.c
+++ b/src/joystick/SDL_steam_virtual_gamepad.c
@@ -221,6 +221,7 @@ SDL_bool SDL_UpdateSteamVirtualGamepadInfo(void)
     if (slot >= 0) {
         AddVirtualGamepadInfo(slot, &info);
     }
+    SDL_free(info.name);
     SDL_free(data);
 
     SDL_steam_virtual_gamepad_info_file_mtime = mtime;