snd_xmp.c: add missing Hunk_Free to xmp_load_module_from_memory failure

This commit is contained in:
Ozkan Sezer 2022-07-02 11:55:50 +03:00
parent 673a4a7315
commit d27d3db19f
1 changed files with 1 additions and 0 deletions

View File

@ -93,6 +93,7 @@ static qboolean S_XMP_CodecOpenStream (snd_stream_t *stream)
moddata = (byte *) Hunk_Alloc(len);
FS_fread(moddata, 1, len, &stream->fh);
if (xmp_load_module_from_memory(c, moddata, len) < 0) {
Hunk_FreeToLowMark(mark);
Con_DPrintf("Could not load module %s\n", stream->name);
goto err1;
}