Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2018 05:49:26 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r331180 - head/usr.sbin/rpcbind
Message-ID:  <201803190549.w2J5nQe8065930@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



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