spoolss: Add missing LeaveCriticalSection on error path (Smatch).

This commit is contained in:
Michael Stefaniuc 2009-02-06 21:48:36 +01:00 committed by Alexandre Julliard
parent a840c35d42
commit df271e0e8f
1 changed files with 4 additions and 1 deletions

View File

@ -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);