mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:36:23 +00:00
- fix memory leak
svn path=/trunk/; revision=29739
This commit is contained in:
parent
60efb9002e
commit
027341f0cb
2 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue