K 10 svn:author V 7 oshogbo K 8 svn:date V 27 2017-10-21T19:33:31.435164Z K 7 svn:log V 514 MFC r323854: Because nvp wasn't initialized on every loop iteration once we jumped to 'fail' on error it was treated as success, because nvp!=NULL. Fix this by not handling success under 'fail' label and by using separate variable for parent nvpair. If we succeeded to allocate nvlist, but failed to allocated nvpair we would leak nvls[ii] on return. Destroy it when we cannot allocate nvpair, before we goto fail. Submitted by: pjd@ and oshogbo@ (minor changes) Found by: scan-build Sponsored by: Wheel Systems END