spoolss: Add missing LeaveCriticalSection on error path (Smatch).
Michael Stefaniuc
mstefani at redhat.de
Fri Feb 6 14:48:36 CST 2009
---
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);
--
1.6.1.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090206/0999e5dd/attachment-0001.pgp
More information about the wine-patches
mailing list