Try to fix memory leak.

This commit is contained in:
Donal Cahill
2015-12-13 07:58:04 +00:00
parent d6b839ef85
commit 8748abb525
+4 -1
View File
@@ -886,7 +886,10 @@ bool CUser::IsHostAllowed(const CString& sHostMask) const {
iIsRangeValid = getaddrinfo(vsSplitCIDR.front().c_str(), NULL,
&aiHints, &aiRange);
if (iIsRangeValid != 0) continue;
if (iIsRangeValid != 0) {
freeaddrinfo(aiHost);
continue;
}
// "/0" allows all IPv[4|6] addresses
if (iRoutingPrefix == 0) return true;