From 9c70ca9da6479595946def59cd616e6823c86d78 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 14 Apr 2014 01:33:31 -0700 Subject: Avoid memory leak if preset ID lookup fails --- OpenAL32/alSoundfont.c | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenAL32/alSoundfont.c') diff --git a/OpenAL32/alSoundfont.c b/OpenAL32/alSoundfont.c index a89ce4d1..0952c412 100644 --- a/OpenAL32/alSoundfont.c +++ b/OpenAL32/alSoundfont.c @@ -350,6 +350,7 @@ AL_API void AL_APIENTRY alSoundfontPresetsSOFT(ALuint id, ALsizei count, const A { if(!(presets[i]=LookupPreset(device, pids[i]))) { + free(presets); WriteUnlock(&sfont->Lock); SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); } -- cgit v1.2.3