mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
Plug memory leak.
Found by: Coverity Prevent CID: 7051 MFC after: 3 days
This commit is contained in:
parent
6744284aec
commit
9f31eddba0
1 changed files with 2 additions and 0 deletions
|
|
@ -707,8 +707,10 @@ nv_add(struct nv *nv, const unsigned char *value, size_t vsize, int type,
|
|||
assert(errno != 0);
|
||||
if (nv->nv_error == 0)
|
||||
nv->nv_error = errno;
|
||||
free(nvh);
|
||||
return;
|
||||
}
|
||||
free(nvh);
|
||||
/* Add the actual data. */
|
||||
if (ebuf_add_tail(nv->nv_ebuf, value, vsize) < 0) {
|
||||
assert(errno != 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue