Module: wine Branch: master Commit: 5ef6f99108874362857525eb5447d5e1cf77a609 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5ef6f99108874362857525eb54...
Author: Marcus Meissner marcus@jet.franken.de Date: Tue Jun 25 09:59:34 2013 +0200
ole32: LeaveCriticalSection in one exit case (Coverity).
---
dlls/ole32/ifs.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/ole32/ifs.c b/dlls/ole32/ifs.c index 8ec6bd8..35ed04b 100644 --- a/dlls/ole32/ifs.c +++ b/dlls/ole32/ifs.c @@ -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; }