mirror_zfs/tests/zfs-tests/cmd
Gvozden Neskovic a64f903b06 Fixes for issues found with cppcheck tool
The patch fixes small number of errors/false positives reported by `cppcheck`,
static analysis tool for C/C++.

cppcheck 1.72

$ cppcheck . --force --quiet
[cmd/zfs/zfs_main.c:4444]: (error) Possible null pointer dereference: who_perm
[cmd/zfs/zfs_main.c:4445]: (error) Possible null pointer dereference: who_perm
[cmd/zfs/zfs_main.c:4446]: (error) Possible null pointer dereference: who_perm
[cmd/zpool/zpool_iter.c:317]: (error) Uninitialized variable: nvroot
[cmd/zpool/zpool_vdev.c:1526]: (error) Memory leak: child
[lib/libefi/rdwr_efi.c:1118]: (error) Memory leak: efi_label
[lib/libuutil/uu_misc.c:207]: (error) va_list 'args' was opened but not closed by va_end().
[lib/libzfs/libzfs_import.c:1554]: (error) Dangerous usage of 'diskname' (strncpy doesn't always null-terminate it).
[lib/libzfs/libzfs_sendrecv.c:3279]: (error) Dereferencing 'cp' after it is deallocated / released
[tests/zfs-tests/cmd/file_write/file_write.c:154]: (error) Possible null pointer dereference: operation
[tests/zfs-tests/cmd/randfree_file/randfree_file.c:90]: (error) Memory leak: buf
[cmd/zinject/zinject.c:1068]: (error) Uninitialized variable: dataset
[module/icp/io/sha2_mod.c:698]: (error) Uninitialized variable: blocks_per_int64

Signed-off-by: Gvozden Neskovic <neskovic@gmail.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1392
2016-07-27 13:31:22 -07:00
..
chg_usr_exec Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
devname2devid Only build devname2devid when libudev headers are available 2016-03-31 14:54:47 -07:00
dir_rd_update Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
file_check Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
file_trunc Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
file_write Fixes for issues found with cppcheck tool 2016-07-27 13:31:22 -07:00
largest_file Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
mkbusy Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
mkfile Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
mkfiles Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
mktree OpenZFS 2605, 6980, 6902 2016-06-28 13:47:02 -07:00
mmap_exec Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
mmapwrite Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
randfree_file Fixes for issues found with cppcheck tool 2016-07-27 13:31:22 -07:00
readmmap Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
rename_dir Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
rm_lnkcnt_zero_file Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
threadsappend Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
xattrtest xattrtest: allow verify with -R and other improvements 2016-06-24 13:12:43 -07:00
file_common.h Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
Makefile.am Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00