mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-31 03:19:29 +00:00
Merge pull request #102 from paullouisageneau/fix-getaddrinfo-leak
Fix getaddrinfo() leak in Candidate::resolve()
This commit is contained in:
@ -107,8 +107,9 @@ bool Candidate::resolve(ResolveMode mode) {
|
|||||||
oss << sp << nodebuffer << sp << servbuffer << sp << "typ" << sp << type;
|
oss << sp << nodebuffer << sp << servbuffer << sp << "typ" << sp << type;
|
||||||
oss << left;
|
oss << left;
|
||||||
mCandidate = oss.str();
|
mCandidate = oss.str();
|
||||||
|
mIsResolved = true;
|
||||||
PLOG_VERBOSE << "Resolved candidate: " << mCandidate;
|
PLOG_VERBOSE << "Resolved candidate: " << mCandidate;
|
||||||
return mIsResolved = true;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -116,7 +117,7 @@ bool Candidate::resolve(ResolveMode mode) {
|
|||||||
freeaddrinfo(result);
|
freeaddrinfo(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return mIsResolved;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Candidate::isResolved() const { return mIsResolved; }
|
bool Candidate::isResolved() const { return mIsResolved; }
|
||||||
|
Reference in New Issue
Block a user