Skip to content

Commit

Permalink
Plug memory leak in case when nvlist allocation succeeds, but nvpair
Browse files Browse the repository at this point in the history
allocation fails.

Submitted by:	pjd@
MFC after:	1 month
Sponsored by:	Wheel Systems
  • Loading branch information
oshogbo committed Sep 21, 2017
1 parent 7bed56b commit d1a32b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/contrib/libnv/nvpair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ nvpair_unpack_nvlist_array(bool isbe __unused, nvpair_t *nvp,
return (ptr);
fail:
ERRNO_SAVE();
for (j = 0; j < ii; j++)
for (j = 0; j <= ii; j++)
nvlist_destroy(value[j]);
nv_free(value);
ERRNO_RESTORE();
Expand Down

0 comments on commit d1a32b7

Please sign in to comment.