svn commit: r331180 - head/usr.sbin/rpcbind

Xin LI delphij at FreeBSD.org
Mon Mar 19 05:49:27 UTC 2018


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;


More information about the svn-src-all mailing list