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. MFC after: 1 week Reported by: Coverity Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com> Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
d140ec33c7
commit
7f3159edc5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=293705
@ -661,11 +661,11 @@ __rpcbind_is_up(void)
|
||||
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