zfs/lib/libzutil
Richard Yao 4c59fde1f5 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-12-01 12:39:42 -08:00
..
os Remove incorrect free() in zfs_get_pci_slots_sys_path() 2022-12-01 12:39:40 -08:00
Makefile.am Ask libtool to stop hiding some errors 2022-09-21 16:12:14 -07:00
zutil_device_path.c OpenZFS restructuring - libzutil 2019-10-03 10:20:44 -07:00
zutil_import.c Fix theoretical use of uninitialized values 2022-12-01 12:39:42 -08:00
zutil_import.h OpenZFS restructuring - libzutil 2019-10-03 10:20:44 -07:00
zutil_nicenum.c zed: Control NVMe fault LEDs 2021-11-05 07:51:21 -07:00
zutil_pool.c Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00