https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b6c060ce04be831efa7f1b9f39c29836f45650a3
commit b6c060ce04be831efa7f1b9f39c29836f45650a3 Author: Serge Gautherie <32623169+sergegauthe...@users.noreply.github.com> AuthorDate: Fri Feb 23 18:35:02 2018 +0100 Commit: Ged Murphy <gedmur...@reactos.org> CommitDate: Fri Feb 23 17:35:02 2018 +0000 [IPHLPAPI] Fix getNumRoutes() return value, on Mib error (#391) --- dll/win32/iphlpapi/ipstats_reactos.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dll/win32/iphlpapi/ipstats_reactos.c b/dll/win32/iphlpapi/ipstats_reactos.c index 2b981c1112..ed95d42705 100644 --- a/dll/win32/iphlpapi/ipstats_reactos.c +++ b/dll/win32/iphlpapi/ipstats_reactos.c @@ -387,9 +387,9 @@ DWORD getNumRoutes(void) memset( &isnmp, 0, sizeof( isnmp ) ); status = tdiGetMibForIpEntity( tcpFile, &entitySet[i], &isnmp ); if( !NT_SUCCESS(status) ) { - tdiFreeThingSet( entitySet ); - closeTcpFile( tcpFile ); - return status; + WARN("tdiGetMibForIpEntity failed for i = %d", i); + numRoutes = 0; + break; } numRoutes += isnmp.ipsi_numroutes; }