Author: delphij
Date: Mon Mar 19 05:49:26 2018
New Revision: 331180
URL: https://svnweb.freebsd.org/changeset/base/331180

Log:
  Plug a possible memory leak.
  
  MFC after:    2 weeks

Modified:
  head/usr.sbin/rpcbind/rpcbind.c

Modified: head/usr.sbin/rpcbind/rpcbind.c
==============================================================================
--- head/usr.sbin/rpcbind/rpcbind.c     Mon Mar 19 04:16:37 2018        
(r331179)
+++ head/usr.sbin/rpcbind/rpcbind.c     Mon Mar 19 05:49:26 2018        
(r331180)
@@ -565,6 +565,8 @@ init_transport(struct netconfig *nconf)
                pml->pml_map.pm_port = PMAPPORT;
                if (strcmp(nconf->nc_proto, NC_TCP) == 0) {
                        if (tcptrans[0]) {
+                               free(pml);
+                               pml = NULL;
                                syslog(LOG_ERR,
                                "cannot have more than one TCP transport");
                                goto error;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to