Plug a possible memory leak.

MFC after:	2 weeks
This commit is contained in:
Xin LI 2018-03-19 05:49:26 +00:00
parent c3bf638194
commit 3e09403f77

View File

@ -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;