freebsd-nq/lib
Richard Yao 4ecd96371b Fix theoretical use of uninitialized values
Clang's static analyzer complains about this.

In get_configs(), if we have an invalid configuration that has no top
level vdevs, we can read a couple of uninitialized variables. Aborting
upon seeing this would break the userland tools for healthy pools, so we
instead initialize the two variables to 0 to allow the userland tools to
continue functioning for the pools with valid configurations.

In zfs_do_wait(), if no wait activities are enabled, we read an
uninitialized error variable.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14043
2022-10-19 17:10:21 -07:00
..
libavl cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libefi Cleanup: Address Clang's static analyzer's unused code complaints 2022-10-14 13:37:54 -07:00
libicp Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
libnvpair Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
libshare Fix unsafe string operations 2022-09-27 16:47:24 -07:00
libspl Reduce false positives from Static Analyzers 2022-09-30 15:30:12 -07:00
libtpool Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
libunicode cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libuutil Cleanup: Remove unused uu_pname code 2022-09-19 17:33:52 -07:00
libzfs Cleanup: Delete unnecessary pointer check from vdev_to_nvlist_iter() 2022-10-18 15:39:32 -07:00
libzfs_core Fix potential NULL pointer dereference in lzc_ioctl() 2022-10-14 13:33:22 -07:00
libzfsbootenv Fix unchecked return values and unused return values 2022-09-23 16:52:03 -07:00
libzpool set_global_var() should not pass NULL pointers to dlclose() 2022-10-18 15:35:13 -07:00
libzstd cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libzutil Fix theoretical use of uninitialized values 2022-10-19 17:10:21 -07:00
Makefile.am autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00