From 0cf129a368fac6c1f7e261806a44f9d5b2ade100 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Mon, 2 Sep 2019 22:13:36 +0300 Subject: [PATCH] Sound: OpenAL: Free the sound buffer after load --- src/engine/e_sound_al.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/e_sound_al.inc b/src/engine/e_sound_al.inc index 38b9bb6..aa843df 100644 --- a/src/engine/e_sound_al.inc +++ b/src/engine/e_sound_al.inc @@ -337,6 +337,8 @@ begin e_SoundsArray[find_id].Loader := Loader; end; + // the calling side won't free this, the loader will get a copy, so fuck it + FreeMem(pData); ID := find_id; Result := True; end; @@ -412,6 +414,8 @@ begin e_SoundsArray[find_id].Loader := Loader; end; + // the calling side won't free this, the loader will get a copy, so fuck it + FreeMem(pData); ID := find_id; Result := True; end; -- 2.29.2