Author: weiden
Date: Fri Jan 19 03:23:48 2007
New Revision: 25523
URL:
http://svn.reactos.org/svn/reactos?rev=25523&view=rev
Log:
Fix freeing memory
Modified:
trunk/reactos/dll/win32/netid/netid.c
Modified: trunk/reactos/dll/win32/netid/netid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netid/netid.c?re…
==============================================================================
--- trunk/reactos/dll/win32/netid/netid.c (original)
+++ trunk/reactos/dll/win32/netid/netid.c Fri Jan 19 03:23:48 2007
@@ -20,7 +20,6 @@
IN WPARAM wParam,
IN LPARAM lParam)
{
- LPWKSTA_INFO_101 wki;
INT_PTR Ret = 0;
UNREFERENCED_PARAMETER(lParam);
@@ -31,6 +30,7 @@
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,8 +46,10 @@
SetDlgItemText(hwndDlg,
IDC_WORKGROUPDOMAIN_NAME,
wki->wki101_langroup);
- NetApiBufferFree(&wki);
}
+
+ if (wki != NULL)
+ NetApiBufferFree(wki);
Ret = TRUE;
break;