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:
parent
3815c80a2e
commit
9043c75aa1
@ -1945,6 +1945,7 @@ nvpair_free(nvpair_t *nvp)
|
|||||||
case NV_TYPE_STRING_ARRAY:
|
case NV_TYPE_STRING_ARRAY:
|
||||||
for (i = 0; i < nvp->nvp_nitems; i++)
|
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)[i]);
|
||||||
|
nv_free((char **)(intptr_t)nvp->nvp_data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
nv_free(nvp);
|
nv_free(nvp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user