Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jun 2001 08:03:07 -0700 (PDT)
From:      Ian Dowse <iedowse@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/usr.sbin/rpcbind util.c
Message-ID:  <200106241503.f5OF37t25698@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
iedowse     2001/06/24 08:03:07 PDT

  Modified files:
    usr.sbin/rpcbind     util.c 
  Log:
  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.
  
  Revision  Changes    Path
  1.3       +121 -137  src/usr.sbin/rpcbind/util.c


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106241503.f5OF37t25698>