summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx36
-rw-r--r--shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx3
-rw-r--r--shell/source/win32/shlxthandler/shlxthdl.cxx3
3 files changed, 13 insertions, 29 deletions
diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
index 9f37b3b62c0d..83df85f3981c 100644
--- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
+++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
@@ -817,21 +817,16 @@ SCODE STDMETHODCALLTYPE COooFilterCF::CreateInstance(
if ( 0 != pUnkOuter )
return CLASS_E_NOAGGREGATION;
pIUnk = new COooFilter();
- if ( 0 != pIUnk )
+ if ( SUCCEEDED( pIUnk->QueryInterface( riid , ppvObject ) ) )
{
- if ( SUCCEEDED( pIUnk->QueryInterface( riid , ppvObject ) ) )
- {
- // Release extra refcount from QueryInterface
- pIUnk->Release();
- }
- else
- {
- delete pIUnk;
- return E_UNEXPECTED;
- }
+ // Release extra refcount from QueryInterface
+ pIUnk->Release();
}
else
- return E_OUTOFMEMORY;
+ {
+ delete pIUnk;
+ return E_UNEXPECTED;
+ }
return S_OK;
}
@@ -919,19 +914,14 @@ extern "C" SCODE STDMETHODCALLTYPE DllGetClassObject(
}
else
return CLASS_E_CLASSNOTAVAILABLE;
- if ( 0 != pResult )
+ if( SUCCEEDED( pResult->QueryInterface( iid, ppvObj ) ) )
+ // Release extra refcount from QueryInterface
+ pResult->Release();
+ else
{
- if( SUCCEEDED( pResult->QueryInterface( iid, ppvObj ) ) )
- // Release extra refcount from QueryInterface
- pResult->Release();
- else
- {
- delete pImpl;
- return E_UNEXPECTED;
- }
+ delete pImpl;
+ return E_UNEXPECTED;
}
- else
- return E_OUTOFMEMORY;
return S_OK;
}
//F-------------------------------------------------------------------------
diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
index 21a25132a773..009786794ee8 100644
--- a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
+++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
@@ -432,9 +432,6 @@ extern "C" STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
return E_NOINTERFACE;
IUnknown* pUnk = new CClassFactory( rclsid );
- if ( 0 == pUnk )
- return E_OUTOFMEMORY;
-
*ppv = pUnk;
return S_OK;
}
diff --git a/shell/source/win32/shlxthandler/shlxthdl.cxx b/shell/source/win32/shlxthandler/shlxthdl.cxx
index 21257c717c5c..b4e1d2197b31 100644
--- a/shell/source/win32/shlxthandler/shlxthdl.cxx
+++ b/shell/source/win32/shlxthandler/shlxthdl.cxx
@@ -402,9 +402,6 @@ extern "C" STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
OutputDebugStringFormat( "DllGetClassObject: Create CLSID_THUMBVIEWER_HANDLER\n" );
IUnknown* pUnk = new CClassFactory(rclsid);
- if (0 == pUnk)
- return E_OUTOFMEMORY;
-
*ppv = pUnk;
return S_OK;
}