HomeFreeBSD

Fix rpcbind init after r300941.

Description

Fix rpcbind init after r300941.

  • getaddrinfo() sets res = NULL on failure and freeaddrinfo() always dereferences its argument, so we should only free the address list after a successful call.
  • Address a second potential leak caused by getaddrinfo(AF_INET6) overwriting the address list returned by getaddrinfo(AF_INET).

X-MFC-With: r300941

Details

Provenance
markjAuthored on
Parents
rS300971: Stop inlining the struct ucond definition into struct pthread_cond.
Branches
Unknown
Tags
Unknown