]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix a potential memory leak with wavefront sounds
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 15 Jul 2020 14:59:09 +0000 (14:59 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 15 Jul 2020 14:59:09 +0000 (14:59 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12822 d7cf8633-e32d-0410-b094-e92efae38249

snd_wav.c

index 6f861913335007bb2f155a68aa5b672c16cdaaee..b4d014b34a71fc3d03739d4dec1fae00195357ca 100644 (file)
--- a/snd_wav.c
+++ b/snd_wav.c
@@ -344,5 +344,6 @@ qboolean S_LoadWavFile (const char *filename, sfx_t *sfx)
        sfx->loopstart = min(sfx->loopstart, sfx->total_length);
        sfx->flags &= ~SFXFLAG_STREAMED;
 
+       Mem_Free(data); // we already got a copy of this in fetcher_data
        return true;
 }