]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
strafehud: fix memory leak in strafe sonar when setting the audio back to an empty...
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Mon, 9 Sep 2024 17:03:59 +0000 (19:03 +0200)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Mon, 9 Sep 2024 17:44:35 +0000 (19:44 +0200)
qcsrc/client/hud/panel/strafehud/extra.qc

index cba63904598d649e854ef0b22022203ca3fa515c..2054d420cd723b75ab18bbfb954b2d28c9978d5e 100644 (file)
@@ -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)