diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c index c9779fa9f34c..b0d79df20b16 100644 --- a/usr.sbin/rpcbind/rpcbind.c +++ b/usr.sbin/rpcbind/rpcbind.c @@ -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;