Plug memory leak.
Found by: Coverity Prevent CID: 7051 MFC after: 3 days
This commit is contained in:
parent
ccd077e269
commit
d5bb9ec5ff
@ -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 New Issue
Block a user