libnv: fix memory leaks
Free the data array for NV_TYPE_DESCRIPTOR_ARRAY case. MFC after: 2 weeks
This commit is contained in:
parent
b5d787d93b
commit
0020c845a0
@ -2061,6 +2061,7 @@ nvpair_free(nvpair_t *nvp)
|
||||
case NV_TYPE_DESCRIPTOR_ARRAY:
|
||||
for (i = 0; i < nvp->nvp_nitems; i++)
|
||||
close(((int *)(intptr_t)nvp->nvp_data)[i]);
|
||||
nv_free((int *)(intptr_t)nvp->nvp_data);
|
||||
break;
|
||||
#endif
|
||||
case NV_TYPE_NVLIST:
|
||||
|
Loading…
Reference in New Issue
Block a user