changeset 3823:2cbdd0a48584

6494119 zpool status command exits with abort
author vb160487
date Thu, 15 Mar 2007 09:21:03 -0700
parents 831cb9e53b03
children 5e04e5a474b4
files usr/src/lib/libzfs/common/libzfs_pool.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/lib/libzfs/common/libzfs_pool.c	Thu Mar 15 08:58:45 2007 -0700
+++ b/usr/src/lib/libzfs/common/libzfs_pool.c	Thu Mar 15 09:21:03 2007 -0700
@@ -1552,9 +1552,10 @@
 		    &zc) != 0) {
 			free((void *)(uintptr_t)zc.zc_nvlist_dst);
 			if (errno == ENOMEM) {
+				count = zc.zc_nvlist_dst_size;
 				if ((zc.zc_nvlist_dst = (uintptr_t)
-				    zfs_alloc(zhp->zpool_hdl,
-				    zc.zc_nvlist_dst_size)) == (uintptr_t)NULL)
+				    zfs_alloc(zhp->zpool_hdl, count *
+				    sizeof (zbookmark_t))) == (uintptr_t)NULL)
 					return (-1);
 			} else {
 				return (-1);