Bug 1925667: don't leak AF_ROUTE sockets on mac r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D226367
This commit is contained in:
Randell Jesup 2024-10-23 16:20:35 +00:00
parent e863dbf8e4
commit 126bfbf7f4

View File

@ -427,6 +427,7 @@ bool nsNetworkLinkService::RoutingFromKernel(nsTArray<nsCString>& aHash) {
LOG(("RoutingFromKernel: Can create a socket for network id"));
return false;
}
auto sockfd_guard = mozilla::MakeScopeExit([sockfd] { close(sockfd); });
MOZ_ASSERT(!NS_IsMainThread());