mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +00:00
Fix freeing memory
svn path=/trunk/; revision=25523
This commit is contained in:
parent
0c3e4dc99b
commit
ff8132912c
1 changed files with 4 additions and 2 deletions
|
@ -20,7 +20,6 @@ NetIDPageProc(IN HWND hwndDlg,
|
|||
IN WPARAM wParam,
|
||||
IN LPARAM lParam)
|
||||
{
|
||||
LPWKSTA_INFO_101 wki;
|
||||
INT_PTR Ret = 0;
|
||||
|
||||
UNREFERENCED_PARAMETER(lParam);
|
||||
|
@ -31,6 +30,7 @@ NetIDPageProc(IN HWND hwndDlg,
|
|||
case WM_INITDIALOG:
|
||||
{
|
||||
/* Display computer name */
|
||||
LPWKSTA_INFO_101 wki = NULL;
|
||||
DWORD Size = MAX_COMPUTERNAME_LENGTH + 1;
|
||||
TCHAR ComputerName[MAX_COMPUTERNAME_LENGTH + 1];
|
||||
if (GetComputerName(ComputerName,&Size))
|
||||
|
@ -46,9 +46,11 @@ NetIDPageProc(IN HWND hwndDlg,
|
|||
SetDlgItemText(hwndDlg,
|
||||
IDC_WORKGROUPDOMAIN_NAME,
|
||||
wki->wki101_langroup);
|
||||
NetApiBufferFree(&wki);
|
||||
}
|
||||
|
||||
if (wki != NULL)
|
||||
NetApiBufferFree(wki);
|
||||
|
||||
Ret = TRUE;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue