ole32: Fix possible return of freed pointer (Coverity).

This commit is contained in:
Nikolay Sivov 2013-03-31 18:54:02 +04:00 committed by Alexandre Julliard
parent 58bbe5ac4c
commit 611cf6bb0d
1 changed files with 1 additions and 1 deletions

View File

@ -379,6 +379,7 @@ static HRESULT COMPOBJ_DllList_Add(LPCWSTR library_name, OpenDll **ret)
entry->DllCanUnloadNow = DllCanUnloadNow; entry->DllCanUnloadNow = DllCanUnloadNow;
entry->DllGetClassObject = DllGetClassObject; entry->DllGetClassObject = DllGetClassObject;
list_add_tail(&openDllList, &entry->entry); list_add_tail(&openDllList, &entry->entry);
*ret = entry;
} }
else else
{ {
@ -386,7 +387,6 @@ static HRESULT COMPOBJ_DllList_Add(LPCWSTR library_name, OpenDll **ret)
hr = E_OUTOFMEMORY; hr = E_OUTOFMEMORY;
FreeLibrary(hLibrary); FreeLibrary(hLibrary);
} }
*ret = entry;
} }
LeaveCriticalSection( &csOpenDllList ); LeaveCriticalSection( &csOpenDllList );