shell32: Fix possible memory leak in CreateUnixFolder.

oldstable
David Hedberg 2010-06-01 04:46:44 +02:00 committed by Alexandre Julliard
parent 5c451900bb
commit c1682eb8eb
1 changed files with 3 additions and 1 deletions

View File

@ -2158,13 +2158,15 @@ static const IDropTargetVtbl UnixFolder_IDropTarget_Vtbl = {
static HRESULT CreateUnixFolder(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, const CLSID *pCLSID)
{
HRESULT hr = E_FAIL;
UnixFolder *pUnixFolder = SHAlloc((ULONG)sizeof(UnixFolder));
UnixFolder *pUnixFolder;
if (pUnkOuter) {
FIXME("Aggregation not yet implemented!\n");
return CLASS_E_NOAGGREGATION;
}
pUnixFolder = SHAlloc((ULONG)sizeof(UnixFolder));
if(pUnixFolder) {
pUnixFolder->lpIShellFolder2Vtbl = &UnixFolder_IShellFolder2_Vtbl;
pUnixFolder->lpIPersistFolder3Vtbl = &UnixFolder_IPersistFolder3_Vtbl;