Searched hist:78705 (Results 1 - 1 of 1) sorted by relevance

/freebsd-11-stable/usr.sbin/rpcbind/
H A Dutil.cdiff 78705 Sun Jun 24 13:03:06 MDT 2001 iedowse Clean up the addrmerge() function, which was over-complicated and
contained a number of memory leaks. The changes include:

- Add a comment describing what addrmerge() does.
- Deal with 0.0.0.0./::. or AF_LOCAL callers correctly.
- Use rpcbind_get_conf() instead of getnetconfigent() so we don't
have to remember to free the returned netconfig struct.
- Make just one pass through the ifaddrs list; we can pick up a fallback
interface address in the same pass as the netmask comparison.
- Define and use SA2SIN* macros to avoid the need for loads of
protocol-specific local variables.
- Use mostly protocol-independent code for building the netbuf version
of the address to be returned.
- Use the common cleanup code for virtually all error and non-error
cases, fixing a number of memory leaks.

Completed in 171 milliseconds