ole32: LeaveCriticalSection in one exit case (Coverity).

This commit is contained in:
Marcus Meissner 2013-06-25 09:59:34 +02:00 committed by Alexandre Julliard
parent c69cc5506b
commit 5ef6f99108
1 changed files with 5 additions and 2 deletions

View File

@ -217,13 +217,16 @@ static LPVOID WINAPI IMalloc_fnRealloc(LPMALLOC iface,LPVOID pv,DWORD cb) {
IMallocSpy_Release(Malloc32.pSpy);
Malloc32.SpyReleasePending = FALSE;
Malloc32.pSpy = NULL;
LeaveCriticalSection(&IMalloc32_SpyCS);
}
if (0==cb) {
/* PreRealloc can force Realloc to fail */
LeaveCriticalSection(&IMalloc32_SpyCS);
/* PreRealloc can force Realloc to fail */
if (Malloc32.pSpy)
LeaveCriticalSection(&IMalloc32_SpyCS);
return NULL;
}
pv = pRealMemory;
}