From 24283d3e7f21e6591fe6cc06dfebcf84602d52c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 27 Jan 2026 20:05:24 +0100 Subject: [PATCH] Fix memory leak in TextDrawerSDL (sigh, variable shadowing) --- Common/Render/Text/draw_text_sdl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/Render/Text/draw_text_sdl.cpp b/Common/Render/Text/draw_text_sdl.cpp index 56ce8be989..fb146c61ba 100644 --- a/Common/Render/Text/draw_text_sdl.cpp +++ b/Common/Render/Text/draw_text_sdl.cpp @@ -263,7 +263,7 @@ void TextDrawerSDL::SetOrCreateFont(const FontStyle &style) { INFO_LOG(Log::G3D, "Loading SDL font '%s' from VFS at size %d pts", useFont.c_str(), ptSize); size_t fileSz; - uint8_t *fileData = g_VFS.ReadFile(useFont.c_str(), &fileSz); + fileData = g_VFS.ReadFile(useFont.c_str(), &fileSz); if (fileData) { SDL_RWops *rw = SDL_RWFromMem(fileData, static_cast(fileSz)); INFO_LOG(Log::G3D, "Opened font from RW: '%p' '%d'", fileData, (int)fileSz);