Module: wine Branch: master Commit: df271e0e8f6226e03518b0da27ee95f3d6ae1c0d URL: http://source.winehq.org/git/wine.git/?a=commit;h=df271e0e8f6226e03518b0da27...
Author: Michael Stefaniuc mstefani@redhat.de Date: Fri Feb 6 21:48:36 2009 +0100
spoolss: Add missing LeaveCriticalSection on error path (Smatch).
---
dlls/spoolss/router.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/spoolss/router.c b/dlls/spoolss/router.c index fb3279e..0cd24a7 100644 --- a/dlls/spoolss/router.c +++ b/dlls/spoolss/router.c @@ -215,7 +215,10 @@ static backend_t * backend_load(LPWSTR dllname, LPWSTR name, LPWSTR regroot) id = used_backends;
backend[id] = heap_alloc_zero(sizeof(backend_t)); - if (!backend[id]) return NULL; + if (!backend[id]) { + LeaveCriticalSection(&backend_cs); + return NULL; + }
backend[id]->dllname = strdupW(dllname); backend[id]->name = strdupW(name);