MFp4 @1189711:
Fix resource leaks on nvlist_destroy(). Reported by: Mariusz Zaborski <oshogbo@FreeBSD.org> MFC after: 3 days
This commit is contained in:
parent
2f95141e5f
commit
3ae9762b9a
@ -125,8 +125,10 @@ nvlist_destroy(nvlist_t *nvl)
|
||||
|
||||
NVLIST_ASSERT(nvl);
|
||||
|
||||
while ((nvp = nvlist_first_nvpair(nvl)) != NULL)
|
||||
while ((nvp = nvlist_first_nvpair(nvl)) != NULL) {
|
||||
nvlist_remove_nvpair(nvl, nvp);
|
||||
nvpair_free(nvp);
|
||||
}
|
||||
nvl->nvl_magic = 0;
|
||||
free(nvl);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user