From 94de1d4cf6ec0a3bf040dcc4b8df107c4ed36b51 Mon Sep 17 00:00:00 2001 From: eschrock Date: Wed, 7 Jun 2006 11:54:54 -0700 Subject: 6433264 crash when adding spare: nvlist_lookup_string(cnv, "path", &path) == 0 6433406 zfs_open() can leak memory on failure 6433408 namespace_reload() can leak memory on allocation failure 6433679 zpool_refresh_stats() has poor error semantics 6433680 changelist_gather() ignores libuutil errors --- usr/src/lib/libzfs/common/libzfs_dataset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/src/lib/libzfs/common/libzfs_dataset.c') diff --git a/usr/src/lib/libzfs/common/libzfs_dataset.c b/usr/src/lib/libzfs/common/libzfs_dataset.c index 14ba6112ed..9ff3a083be 100644 --- a/usr/src/lib/libzfs/common/libzfs_dataset.c +++ b/usr/src/lib/libzfs/common/libzfs_dataset.c @@ -351,7 +351,7 @@ zfs_open(libzfs_handle_t *hdl, const char *path, int types) if (!(types & zhp->zfs_type)) { (void) zfs_error(hdl, EZFS_BADTYPE, errbuf); - free(zhp); + zfs_close(zhp); return (NULL); } -- cgit v1.2.3