From: fgsfds Date: Mon, 2 Sep 2019 19:13:36 +0000 (+0300) Subject: Sound: OpenAL: Free the sound buffer after load X-Git-Url: https://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=commitdiff_plain;h=0cf129a368fac6c1f7e261806a44f9d5b2ade100 Sound: OpenAL: Free the sound buffer after load --- 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;