HomeFreeBSD

btree_test: smatch did detect few issues

Description

btree_test: smatch did detect few issues

Add missing header.
Properly ignore return values.

Memory leak/unchecked malloc. We do allocate a bit too early (and
fail to validate the result). From this, smatch is angry when we
overwrite the value of 'node' later.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Toomas Soome <tsoome@me.com>
Closes #13941

Details

Provenance
tsoomeAuthored on Sep 28 2022, 12:09 AM
GitHub <noreply@github.com>Committed on Sep 28 2022, 12:09 AM
Parents
rGe872ea16f260: DMU_BACKUP_FEATURE: indicate that bit 28 and 29 are reserved
Branches
Unknown
Tags
Unknown