From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Mon, 9 Sep 2024 17:03:59 +0000 (+0200) Subject: strafehud: fix memory leak in strafe sonar when setting the audio back to an empty... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8c665f30acf57921520c0b51c6dfd5660591d361;p=xonotic%2Fxonotic-data.pk3dir.git strafehud: fix memory leak in strafe sonar when setting the audio back to an empty string --- diff --git a/qcsrc/client/hud/panel/strafehud/extra.qc b/qcsrc/client/hud/panel/strafehud/extra.qc index cba639045..2054d420c 100644 --- a/qcsrc/client/hud/panel/strafehud/extra.qc +++ b/qcsrc/client/hud/panel/strafehud/extra.qc @@ -138,6 +138,8 @@ string StrafeHUD_UpdateSonarSound() static string sonarsound = string_null; if(newsound == "") { + strfree(cursound); + strfree(sonarsound); cursound = sonarsound = string_null; } else if(newsound != cursound)