Don't leak tmp if p->nc_lookups can't be malloced

MFC after: 1 week
Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
Enji Cooper 2016-05-22 01:45:15 +00:00
parent b9c52b50a7
commit 9c11e6b093
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300385

View File

@ -722,6 +722,7 @@ dup_ncp(struct netconfig *ncp)
if (p->nc_lookups == NULL) {
free(p->nc_netid);
free(p);
free(tmp);
return(NULL);
}
for (i=0; i < p->nc_nlookups; i++) {