Module: wine Branch: master Commit: 611cf6bb0dcfb07549979c2ada1f7281e03c8c47 URL: http://source.winehq.org/git/wine.git/?a=commit;h=611cf6bb0dcfb07549979c2ada...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun Mar 31 18:54:02 2013 +0400
ole32: Fix possible return of freed pointer (Coverity).
---
dlls/ole32/compobj.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 17bd7a1..04d65c9 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 );