From 8c665f30acf57921520c0b51c6dfd5660591d361 Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Mon, 9 Sep 2024 19:03:59 +0200 Subject: [PATCH] strafehud: fix memory leak in strafe sonar when setting the audio back to an empty string --- qcsrc/client/hud/panel/strafehud/extra.qc | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.39.2