From 8ef71b85ac6c646c47c7d5a2c5addd68e4499e14 Mon Sep 17 00:00:00 2001 From: Mia McMahill <84749759+electricbrass@users.noreply.github.com> Date: Sun, 8 Dec 2024 22:37:19 -0600 Subject: [PATCH] Free sound index strings made with strdup --- common/d_dehacked.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/d_dehacked.cpp b/common/d_dehacked.cpp index 3648d3d1c..97c653e6e 100644 --- a/common/d_dehacked.cpp +++ b/common/d_dehacked.cpp @@ -1849,6 +1849,7 @@ void IdxToSoundName(char** sound) if (*sound && IsNum(*sound)) { auto soundIt = SoundMap.find(atoi(*sound)); + free(*sound); *sound = soundIt == SoundMap.end() ? nullptr : (char*)soundIt->second; } }