mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 19:26:05 +00:00
- fix memory leak
svn path=/trunk/; revision=29739
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user