From baaf1b273ee020056ac75c1036d7d0b94f75e748 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Fri, 23 Aug 2013 23:37:55 +0000 Subject: [PATCH] Update vendor/illumos/dist to 14152:46f5fb0b0d36: Illumos DTrace issues: 4061 libzfs: memory leak in iter_dependents_cb() --- lib/libzfs/common/libzfs_iter.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libzfs/common/libzfs_iter.c b/lib/libzfs/common/libzfs_iter.c index be5767f542d6..5dd0f6d0db17 100644 --- a/lib/libzfs/common/libzfs_iter.c +++ b/lib/libzfs/common/libzfs_iter.c @@ -21,8 +21,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ #include @@ -443,8 +443,12 @@ iter_dependents_cb(zfs_handle_t *zhp, void *arg) err = zfs_iter_snapshots(zhp, iter_dependents_cb, ida); ida->stack = isf.next; } + if (!first && err == 0) err = ida->func(zhp, ida->data); + else + zfs_close(zhp); + return (err); }