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 MFC after: 1 month Sponsored by: Wheel Systems |
||
---|---|---|
.. | ||
cnvlist.c | ||
dnvlist.c | ||
nv_impl.h | ||
nvlist_impl.h | ||
nvlist.c | ||
nvpair_impl.h | ||
nvpair.c |