Sync with NetBSD rev. 1.15

Coverity CID 2275: Avoid memory leak on error.

MFC after:    1 month
This commit is contained in:
Martin Blapp 2006-09-09 22:21:15 +00:00
parent b0eb405d46
commit b0718451b8

View file

@ -692,6 +692,7 @@ struct netconfig *ncp;
p->nc_lookups = (char **)malloc((size_t)(p->nc_nlookups+1) * sizeof(char *));
if (p->nc_lookups == NULL) {
free(p->nc_netid);
free(p);
return(NULL);
}
for (i=0; i < p->nc_nlookups; i++) {