- fix memory leak

svn path=/trunk/; revision=29739
This commit is contained in:
Johannes Anderwald 2007-10-21 16:20:14 +00:00
parent 60efb9002e
commit 027341f0cb
2 changed files with 9 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#ifndef __CPL_APPWIZ_H
#define __CPL_APPWIZ_H
#define COBJMACROS
#include <windows.h>
#include <windowsx.h> /* GET_X/Y_LPARAM */
#include <commctrl.h>

View file

@ -61,6 +61,7 @@ WelcomeDlgProc(HWND hwndDlg,
WCHAR szDesc[100];
BROWSEINFOW brws;
LPITEMIDLIST pidllist;
IMalloc* malloc;
switch(uMsg)
{
@ -99,6 +100,13 @@ WelcomeDlgProc(HWND hwndDlg,
if (SHGetPathFromIDList(pidllist, szPath))
SendDlgItemMessage(hwndDlg, IDC_SHORTCUT_LOCATION, WM_SETTEXT, 0, (LPARAM)szPath);
/* Free memory, if possible */
if (SUCCEEDED(SHGetMalloc(&malloc)))
{
IMalloc_Free(malloc, pidllist);
IMalloc_Release(malloc);
}
break;
}
break;