mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260222
|
@ -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…
Reference in a new issue