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

(cherry picked from commit 5385c7e13b06cb42a28bbf8c0d910b0c2ffddec7)

Details

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