mirror_zfs/module
Richard Yao f7bda2de97
Fix userspace memory leaks found by Clang Static Analzyer
Recently, I have been making a push to fix things that coverity found.
However, I was curious what Clang's static analyzer reported, so I ran
it and found things that coverity had missed.

* contrib/pam_zfs_key/pam_zfs_key.c: If prop_mountpoint is passed more
  than once, we leak memory.
* module/zfs/zcp_get.c: We leak memory on temporary properties in
  userspace.
* tests/zfs-tests/cmd/draid.c: On error from vdev_draid_rand(), we leak
  memory if best_map had been allocated by a prior iteration.
* tests/zfs-tests/cmd/mkfile.c: Memory used by the loop is not freed
  before program termination.

Arguably, these are all minor issues, but if we ignore them, then they
could obscure serious bugs, so we fix them.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13955
2022-09-26 17:18:05 -07:00
..
avl Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
icp Cleanup: Remove ineffective unsigned comparisons against 0 2022-09-26 17:02:38 -07:00
lua Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
nvpair Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
os Cleanup: Remove ineffective unsigned comparisons against 0 2022-09-26 17:02:38 -07:00
unicode Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zcommon Enable relatime by default 2022-08-12 14:20:25 -07:00
zfs Fix userspace memory leaks found by Clang Static Analzyer 2022-09-26 17:18:05 -07:00
zstd Tiered early abort, zstd edition 2022-05-24 09:43:22 -07:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in Cleanup dead spa_boot code 2022-09-13 16:40:10 -07:00
Makefile.bsd Cleanup dead spa_boot code 2022-09-13 16:40:10 -07:00
Makefile.in autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00