HomeFreeBSD

stand/zfs: Fix memory leaking on error cases

Description

stand/zfs: Fix memory leaking on error cases

Now that we return an allocated zfs_devdesc, we have to free it. These
frees were missing from the error cases. In addition, simplify the code
a bit for the out of memory case.

Sponsored by: Netflix
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D38006

Details

Provenance
impAuthored on Jan 13 2023, 9:20 PM
Reviewer
kevans
Differential Revision
D38006: stand/zfs: Fix memory leaking on error cases
Parents
rG5740057b4388: stand/uboot: Explain why we test for NULL here
Branches
Unknown
Tags
Unknown