K 10 svn:author V 7 git2svn K 8 svn:date V 27 2021-07-06T18:26:32.199085Z K 7 svn:log V 716 libnv: fix memory leaks nvpair_create_stringv: free the temporary string; this fix affects nvlist_add_stringf() and nvlist_add_stringv(). nvpair_remove_nvlist_array (NV_TYPE_NVLIST_ARRAY case): free the chain of nvpairs (as resetting it prevents nvlist_destroy() from freeing it). Note: freeing the chain in nvlist_destroy() is not sufficient, because it would still leak through nvlist_take_nvlist_array(). This affects all nvlist_*_nvlist_array() use Submitted by: Mindaugas Rasiukevicius Reported by: clang/gcc ASAN MFC after: 2 weeks (cherry picked from commit b5d787d93b3d83f28e87e1f8cc740cb160f8f0ac) Git Hash: dc876a5bcd46b486103c9127f51e01663504195b Git Author: oshogbo@FreeBSD.org END