zfs/cmd/zpool
Joao Carlos Mendes Luis 75c62019f3
Fix allocation errors, detected using ASAN
The test for VDEV_TYPE_INDIRECT is done after a memory allocation, and
could return from function without freeing it.  Since we don't need that
allocation yet, just postpone it.

Add a missing free() when buffer is no longer needed.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: João Carlos Mendes Luís <jonny@jonny.eng.br>
Closes #10193
2020-04-13 10:54:41 -07:00
..
os/linux OpenZFS restructuring - libspl 2019-10-02 10:39:48 -07:00
zpool.d Make zpool.d/iostat work on FreeBSD 2020-02-14 08:37:40 -08:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am OpenZFS restructuring - libspl 2019-10-02 10:39:48 -07:00
zpool_iter.c Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
zpool_main.c Fix allocation errors, detected using ASAN 2020-04-13 10:54:41 -07:00
zpool_util.c OpenZFS restructuring - zpool 2019-09-30 12:16:06 -07:00
zpool_util.h Fix static data to link with -fno-common 2020-02-06 09:25:29 -08:00
zpool_vdev.c OpenZFS restructuring - libspl 2019-10-02 10:39:48 -07:00