mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-09 13:42:56 +00:00
Plug memory leak.
Found by: Coverity Prevent CID: 7051 MFC after: 3 days
This commit is contained in:
parent
6744284aec
commit
9f31eddba0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=209180
@ -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