shell32: Fix missing unlock on an error path. Found by Smatch.

This commit is contained in:
Michael Stefaniuc 2007-07-16 22:10:02 +02:00 committed by Alexandre Julliard
parent 6c63fa627e
commit b6ce3de8e7

View file

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