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
Differential D38006
stand/zfs: Fix memory leaking on error cases imp on Jan 10 2023, 12:18 AM. Authored by Tags None Referenced Files
Details Now that we return an allocated zfs_devdesc, we have to free it. These Sponsored by: Netflix
Diff Detail
Event Timeline
Comment Actions Turns out path can't be NULL here (it would have been dereferenced in mount() So, if strdup returns NULL, bail with ENOMEM after freeing stuff.
|