diff options
author | David Tardon <dtardon@redhat.com> | 2012-03-08 13:52:03 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-03-12 08:53:47 +0100 |
commit | 75c5b3561ebdff4af9fdd219a64ba77fb1a13254 (patch) | |
tree | 9ae294bc191ddba4d51b2e526c0c3f0fae36971e | |
parent | c696282069faa88c486abdffbca6a5255102f4d8 (diff) |
WaE: deleting object of abstract class type with non-virt. destuctor
-rw-r--r-- | shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx index ed49f8217a72..07bb501a0be8 100644 --- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx @@ -908,10 +908,14 @@ extern "C" SCODE STDMETHODCALLTYPE DllGetClassObject( void ** ppvObj ) { + COooFilterCF* pImpl = 0; IUnknown *pResult = 0; if ( CLSID_COooFilter == cid ) - pResult = (IUnknown *) new COooFilterCF; + { + pImpl = new COooFilterCF; + pResult = (IUnknown *) pImpl; + } else return CLASS_E_CLASSNOTAVAILABLE; if ( 0 != pResult ) @@ -921,7 +925,7 @@ extern "C" SCODE STDMETHODCALLTYPE DllGetClassObject( pResult->Release(); else { - delete pResult; + delete pImpl; return E_UNEXPECTED; } } |