[SHELL32]
authorDavid Quintana <gigaherz@gmail.com>
Fri, 15 Aug 2014 10:59:23 +0000 (10:59 +0000)
committerDavid Quintana <gigaherz@gmail.com>
Fri, 15 Aug 2014 10:59:23 +0000 (10:59 +0000)
* Remove an obsolete hack that would only cause leaks now.

svn path=/branches/shell-experiments/; revision=63892

dll/win32/shell32/defcontextmenu.cpp

index 6d8bda3..41591e9 100644 (file)
@@ -1684,21 +1684,13 @@ CDefFolderMenu_Create2(
     const HKEY *ahkeyClsKeys,
     IContextMenu **ppcm)
 {
-    // FIXME: This needs to be freed somewhere (like in the destructor of the context  menu)
-    LPCITEMIDLIST *apidl2 = (LPCITEMIDLIST *) SHAlloc(sizeof(LPCITEMIDLIST) * cidl);
-
-    for (int i = 0; i < (int)cidl; i++)
-    {
-        apidl2[i] = apidl[i];
-    }
-
     DEFCONTEXTMENU pdcm;
     pdcm.hwnd = hwnd;
     pdcm.pcmcb = NULL;
     pdcm.pidlFolder = pidlFolder;
     pdcm.psf = psf;
     pdcm.cidl = cidl;
-    pdcm.apidl = apidl2;
+    pdcm.apidl = apidl;
     pdcm.punkAssociationInfo = NULL;
     pdcm.cKeys = nKeys;
     pdcm.aKeys = ahkeyClsKeys;