mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:16:04 +00:00
[IPHLPAPI] GetAdaptersAddresses(): Add 1 free() in ERROR_NO_DATA case (#2526)
And fix 4 comments.
Follow-up to 68d94581
.
This commit is contained in:
parent
1769793bd1
commit
f540b2b20c
2 changed files with 7 additions and 4 deletions
|
@ -3186,7 +3186,10 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetAdaptersAddresses(ULONG Family,ULONG Flags,PVO
|
||||||
|
|
||||||
ret = openTcpFile(&tcpFile, FILE_READ_DATA);
|
ret = openTcpFile(&tcpFile, FILE_READ_DATA);
|
||||||
if (!NT_SUCCESS(ret))
|
if (!NT_SUCCESS(ret))
|
||||||
|
{
|
||||||
|
free(indexTable);
|
||||||
return ERROR_NO_DATA;
|
return ERROR_NO_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = indexTable->numIndexes; i >= 0; i--)
|
for (i = indexTable->numIndexes; i >= 0; i--)
|
||||||
{
|
{
|
||||||
|
|
|
@ -83,7 +83,7 @@ typedef enum _CLASS_TABLE {
|
||||||
} CLASS_TABLE;
|
} CLASS_TABLE;
|
||||||
|
|
||||||
/* Allocates and returns to you the route table, or NULL if it can't allocate
|
/* Allocates and returns to you the route table, or NULL if it can't allocate
|
||||||
* enough memory. free() the returned table.
|
* enough memory. HeapFree() the returned table.
|
||||||
*/
|
*/
|
||||||
RouteTable *getRouteTable(void);
|
RouteTable *getRouteTable(void);
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ RouteTable *getRouteTable(void);
|
||||||
DWORD getNumArpEntries(void);
|
DWORD getNumArpEntries(void);
|
||||||
|
|
||||||
/* Allocates and returns to you the arp table, or NULL if it can't allocate
|
/* Allocates and returns to you the arp table, or NULL if it can't allocate
|
||||||
* enough memory. free() the returned table.
|
* enough memory. HeapFree() the returned table.
|
||||||
*/
|
*/
|
||||||
PMIB_IPNETTABLE getArpTable(void);
|
PMIB_IPNETTABLE getArpTable(void);
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ PMIB_IPNETTABLE getArpTable(void);
|
||||||
DWORD getNumUdpEntries(void);
|
DWORD getNumUdpEntries(void);
|
||||||
|
|
||||||
/* Allocates and returns to you the UDP state table, or NULL if it can't
|
/* Allocates and returns to you the UDP state table, or NULL if it can't
|
||||||
* allocate enough memory. free() the returned table.
|
* allocate enough memory. HeapFree() the returned table.
|
||||||
*/
|
*/
|
||||||
PVOID getUdpTable(CLASS_TABLE Class);
|
PVOID getUdpTable(CLASS_TABLE Class);
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ PVOID getUdpTable(CLASS_TABLE Class);
|
||||||
DWORD getNumTcpEntries(void);
|
DWORD getNumTcpEntries(void);
|
||||||
|
|
||||||
/* Allocates and returns to you the TCP state table, or NULL if it can't
|
/* Allocates and returns to you the TCP state table, or NULL if it can't
|
||||||
* allocate enough memory. free() the returned table.
|
* allocate enough memory. HeapFree() the returned table.
|
||||||
*/
|
*/
|
||||||
PVOID getTcpTable(CLASS_TABLE Class);
|
PVOID getTcpTable(CLASS_TABLE Class);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue