Fix memory leak in SDL_UpdateSteamVirtualGamepadInfo()

(cherry picked from commit 82d89ff4fb)
(cherry picked from commit a09b0b05eb)
This commit is contained in:
meyraud705 authored and Sam Lantinga committed 2024-02-06 01:56:41 -08:00
1 parent fe297fc6d8
commit d1b6d5f33d
1 file changed
+1
+1
View File
@@ -221,6 +221,7 @@ SDL_bool SDL_UpdateSteamVirtualGamepadInfo(void)
if (slot >= 0) { if (slot >= 0) {
AddVirtualGamepadInfo(slot, &info); AddVirtualGamepadInfo(slot, &info);
} }
SDL_free(info.name);
SDL_free(data); SDL_free(data);
SDL_steam_virtual_gamepad_info_file_mtime = mtime; SDL_steam_virtual_gamepad_info_file_mtime = mtime;