Marcus Meissner : dmloader: Check return of CoCreateInstance (Coverity).
Alexandre Julliard
julliard at winehq.org
Tue Jan 8 13:58:44 CST 2013
Module: wine
Branch: master
Commit: b27027ef09a15bbdf40328107647be813faced46
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b27027ef09a15bbdf40328107647be813faced46
Author: Marcus Meissner <meissner at suse.de>
Date: Mon Jan 7 22:17:25 2013 +0100
dmloader: Check return of CoCreateInstance (Coverity).
---
dlls/dmloader/loader.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c
index 9a4bddc..39f00a0 100644
--- a/dlls/dmloader/loader.c
+++ b/dlls/dmloader/loader.c
@@ -463,7 +463,11 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_SetObject(IDirectMusicLoader8 *ifac
}
/* create object */
- CoCreateInstance (&pDesc->guidClass, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicObject, (LPVOID*)&pObject);
+ hr = CoCreateInstance (&pDesc->guidClass, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicObject, (LPVOID*)&pObject);
+ if (FAILED(hr)) {
+ ERR("Object creation of %s failed 0x%08x\n", debugstr_guid(&pDesc->guidClass),hr);
+ return DMUS_E_LOADER_FAILEDOPEN;
+ }
/* *sigh*... some ms objects have lousy implementation of ParseDescriptor that clears input descriptor :( */
#ifdef NOW_WE_ARE_FREE
More information about the wine-cvs
mailing list