Module: wine Branch: master Commit: b6ce3de8e7d93ad847310764c3636dd4ae676a9c URL: http://source.winehq.org/git/wine.git/?a=commit;h=b6ce3de8e7d93ad847310764c3...
Author: Michael Stefaniuc mstefani@redhat.de Date: Mon Jul 16 22:10:02 2007 +0200
shell32: Fix missing unlock on an error path. Found by Smatch.
---
dlls/shell32/shlfolder.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index e198ba9..cbbd12f 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -248,7 +248,11 @@ static void add_iface_to_cache(REFCLSID clsid, LPVOID pv) sf_cls_cache_entry = HeapReAlloc(GetProcessHeap(), 0, sf_cls_cache.sf_cls_cache_entry, allocated * sizeof(*sf_cls_cache_entry)); } - if (!sf_cls_cache_entry) return; + if (!sf_cls_cache_entry) + { + LeaveCriticalSection(&SHELL32_SF_ClassCacheCS); + return; + }
sf_cls_cache.allocated = allocated; sf_cls_cache.sf_cls_cache_entry = sf_cls_cache_entry;