Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9.2, 0.9.3, and 1.0

stable shellext: delete newly created object if interface is not implemented

fixes a theoretical memory leak

Changeset f63cc5b686ac

Parent e87b99ebd0eb

by Adrian Buehlmann

Changes to one file · Browse files at f63cc5b686ac Showing diff from parent e87b99ebd0eb Diff from another changeset...

 
77
78
79
80
 
 
 
 
 
81
82
83
 
77
78
79
 
80
81
82
83
84
85
86
87
@@ -77,7 +77,11 @@
  if (NULL == pShellExt)   return E_OUTOFMEMORY;   - return pShellExt->QueryInterface(riid, ppvObj); + const HRESULT hr = pShellExt->QueryInterface(riid, ppvObj); + if (FAILED(hr)) + delete pShellExt; + + return hr;   }