From 611cf6bb0dcfb07549979c2ada1f7281e03c8c47 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 31 Mar 2013 18:54:02 +0400 Subject: [PATCH] ole32: Fix possible return of freed pointer (Coverity). --- dlls/ole32/compobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 17bd7a11db7..04d65c9d73c 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -379,6 +379,7 @@ static HRESULT COMPOBJ_DllList_Add(LPCWSTR library_name, OpenDll **ret) entry->DllCanUnloadNow = DllCanUnloadNow; entry->DllGetClassObject = DllGetClassObject; list_add_tail(&openDllList, &entry->entry); + *ret = entry; } else { @@ -386,7 +387,6 @@ static HRESULT COMPOBJ_DllList_Add(LPCWSTR library_name, OpenDll **ret) hr = E_OUTOFMEMORY; FreeLibrary(hLibrary); } - *ret = entry; } LeaveCriticalSection( &csOpenDllList );