Plug memory leak.

Found by:	Coverity Prevent
CID:		7051
MFC after:	3 days
This commit is contained in:
pjd 2010-06-14 21:33:18 +00:00
parent ccd077e269
commit d5bb9ec5ff

View File

@ -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);