From df271e0e8f6226e03518b0da27ee95f3d6ae1c0d Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Fri, 6 Feb 2009 21:48:36 +0100 Subject: [PATCH] spoolss: Add missing LeaveCriticalSection on error path (Smatch). --- dlls/spoolss/router.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/spoolss/router.c b/dlls/spoolss/router.c index fb3279edfe5..0cd24a7d94f 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); -- 2.11.4.GIT