Commit 82c97d95 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

iphlapi: Fix some leaks (coverity).

parent 32f636f6
......@@ -741,6 +741,8 @@ DWORD getIPAddrTable(PMIB_IPADDRTABLE *ppIpAddrTable, HANDLE heap, DWORD flags)
ifp->ifa_addr);
i++;
}
if (ret)
HeapFree(GetProcessHeap(), 0, *ppIpAddrTable);
}
else
ret = ERROR_OUTOFMEMORY;
......@@ -928,6 +930,8 @@ DWORD getIPAddrTable(PMIB_IPADDRTABLE *ppIpAddrTable, HANDLE heap, DWORD flags)
&ifr->ifr_addr);
i++;
}
if (ret)
HeapFree(GetProcessHeap(), 0, *ppIpAddrTable);
}
else
ret = ERROR_OUTOFMEMORY;
......
......@@ -784,6 +784,7 @@ static ULONG adapterAddressesFromIndex(ULONG family, ULONG flags, IF_INDEX index
}
if (ret)
{
HeapFree(GetProcessHeap(), 0, v4addrs);
HeapFree(GetProcessHeap(), 0, routeTable);
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment