ole32/tests: Do not call Release if CoCreateInstance failed.
This commit is contained in:
parent
7361e91fdd
commit
a2880cc61d
|
@ -208,7 +208,7 @@ static void test_CoCreateInstance(void)
|
||||||
OleInitialize(NULL);
|
OleInitialize(NULL);
|
||||||
hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk);
|
hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk);
|
||||||
ok_ole_success(hr, "CoCreateInstance");
|
ok_ole_success(hr, "CoCreateInstance");
|
||||||
IUnknown_Release(pUnk);
|
if(pUnk) IUnknown_Release(pUnk);
|
||||||
OleUninitialize();
|
OleUninitialize();
|
||||||
|
|
||||||
hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk);
|
hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk);
|
||||||
|
|
Loading…
Reference in New Issue