Fix memory leak in the nvlist string array.

Submitted by:	Adam Starak <starak.adam@gmail.com>
MFC after:	1 week
This commit is contained in:
Mariusz Zaborski 2016-07-17 15:29:31 +00:00
parent 79cceaac0f
commit 26dc4fcaa7

View File

@ -1945,6 +1945,7 @@ nvpair_free(nvpair_t *nvp)
case NV_TYPE_STRING_ARRAY:
for (i = 0; i < nvp->nvp_nitems; i++)
nv_free(((char **)(intptr_t)nvp->nvp_data)[i]);
nv_free((char **)(intptr_t)nvp->nvp_data);
break;
}
nv_free(nvp);