[PATCH 0/1] MR4797: dmsynth: Leave critical section when out of memory (Coverity)
From: Fabian Maurer <dark.shadow4(a)web.de> --- dlls/dmsynth/synth.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index 3eed05f35a0..5453c296be3 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -585,7 +585,11 @@ static HRESULT WINAPI synth_Open(IDirectMusicSynth8 *iface, DMUS_PORTPARAMS *par !!(actual.dwEffectFlags & DMUS_EFFECT_REVERB)); fluid_settings_setint(This->fluid_settings, "synth.chorus.active", !!(actual.dwEffectFlags & DMUS_EFFECT_CHORUS)); - if (!(This->fluid_synth = new_fluid_synth(This->fluid_settings))) return E_OUTOFMEMORY; + if (!(This->fluid_synth = new_fluid_synth(This->fluid_settings))) + { + LeaveCriticalSection(&This->cs); + return E_OUTOFMEMORY; + } if ((id = fluid_synth_add_sfont(This->fluid_synth, This->fluid_sfont)) == FLUID_FAILED) WARN("Failed to add fluid_sfont to fluid_synth\n"); synth_reset_default_values(This); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4797
This merge request was approved by Michael Stefaniuc. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4797
Unrelated test failures in input.c and win.c -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4797#note_56968
participants (3)
-
Fabian Maurer -
Fabian Maurer (@DarkShadow44) -
Michael Stefaniuc (@mstefani)