MFC r293705:
Similar to r293704, fix theoretical leak of netconfig(3) resources in __rpcbind_is_up(..) if getnetconfig(3) is partly successful in allocating resources, but not completely successful by moving the endnetconfig(3) call up before we return from the function if nconf == NULL. Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
This commit is contained in:
parent
2e97bc7968
commit
6391e71761
@ -675,11 +675,11 @@ __rpcbind_is_up()
|
||||
strcmp(nconf->nc_protofmly, NC_LOOPBACK) == 0)
|
||||
break;
|
||||
}
|
||||
endnetconfig(localhandle);
|
||||
|
||||
if (nconf == NULL)
|
||||
return (FALSE);
|
||||
|
||||
endnetconfig(localhandle);
|
||||
|
||||
memset(&sun, 0, sizeof sun);
|
||||
sock = _socket(AF_LOCAL, SOCK_STREAM, 0);
|
||||
if (sock < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user