mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:12:57 +00:00
Found a leak fix patch from years ago
svn path=/trunk/; revision=45550
This commit is contained in:
parent
8e0c1b2fb4
commit
9709c3dfb9
1 changed files with 17 additions and 11 deletions
|
@ -183,17 +183,21 @@ LPTSTR GetConnectionType(LPTSTR lpClass)
|
||||||
ConType = (LPTSTR)HeapAlloc(ProcessHeap,
|
ConType = (LPTSTR)HeapAlloc(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
dwDataSize);
|
dwDataSize);
|
||||||
if (ConType == NULL)
|
if (ConType)
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if(RegQueryValueEx(hKey,
|
|
||||||
_T("Name"),
|
|
||||||
NULL,
|
|
||||||
&dwType,
|
|
||||||
(PBYTE)ConType,
|
|
||||||
&dwDataSize) != ERROR_SUCCESS)
|
|
||||||
{
|
{
|
||||||
ConType = NULL;
|
if(RegQueryValueEx(hKey,
|
||||||
|
_T("Name"),
|
||||||
|
NULL,
|
||||||
|
&dwType,
|
||||||
|
(PBYTE)ConType,
|
||||||
|
&dwDataSize) != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
HeapFree(ProcessHeap,
|
||||||
|
0,
|
||||||
|
ConType);
|
||||||
|
|
||||||
|
ConType = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -456,7 +460,9 @@ VOID ShowInfo(BOOL bAll)
|
||||||
|
|
||||||
if (bAll)
|
if (bAll)
|
||||||
{
|
{
|
||||||
_tprintf(_T("\tDescription . . . . . . . . . . . : %s\n"), GetConnectionDescription(pAdapter->AdapterName));
|
LPTSTR lpDesc = GetConnectionDescription(pAdapter->AdapterName);
|
||||||
|
_tprintf(_T("\tDescription . . . . . . . . . . . : %s\n"), lpDesc);
|
||||||
|
HeapFree(ProcessHeap, 0, lpDesc);
|
||||||
_tprintf(_T("\tPhysical Address. . . . . . . . . : %s\n"), PrintMacAddr(pAdapter->Address));
|
_tprintf(_T("\tPhysical Address. . . . . . . . . : %s\n"), PrintMacAddr(pAdapter->Address));
|
||||||
if (pAdapter->DhcpEnabled)
|
if (pAdapter->DhcpEnabled)
|
||||||
_tprintf(_T("\tDHCP Enabled. . . . . . . . . . . : Yes\n"));
|
_tprintf(_T("\tDHCP Enabled. . . . . . . . . . . : Yes\n"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue