Skip to content

Commit

Permalink
Free sound index strings made with strdup
Browse files Browse the repository at this point in the history
  • Loading branch information
electricbrass committed Dec 9, 2024
1 parent 7d53b81 commit 8ef71b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/d_dehacked.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 8ef71b8

Please sign in to comment.