mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Sync with NetBSD rev. 1.15
Coverity CID 2275: Avoid memory leak on error. MFC after: 1 month
This commit is contained in:
parent
b0eb405d46
commit
b0718451b8
1 changed files with 1 additions and 0 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue