svn commit: r263408 - in stable: 8/cddl/contrib/opensolaris/lib/libzfs/common 9/cddl/contrib/opensolaris/lib/libzfs/common
Xin LI
delphij at FreeBSD.org
Thu Mar 20 00:32:27 UTC 2014
Author: delphij
Date: Thu Mar 20 00:32:26 2014
New Revision: 263408
URL: http://svnweb.freebsd.org/changeset/base/263408
Log:
MFC r254755: MFV r254748:
Fix memory leak in libzfs's iter_dependents_cb().
Illumos ZFS issues:
4061 libzfs: memory leak in iter_dependents_cb()
Modified:
stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
Directory Properties:
stable/9/cddl/contrib/opensolaris/ (props changed)
stable/9/cddl/contrib/opensolaris/lib/libzfs/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
Directory Properties:
stable/8/cddl/contrib/opensolaris/ (props changed)
stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed)
Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Thu Mar 20 00:28:53 2014 (r263407)
+++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Thu Mar 20 00:32:26 2014 (r263408)
@@ -21,10 +21,10 @@
/*
* 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 (c) 2012 Pawel Jakub Dawidek <pawel at dawidek.net>.
* All rights reserved.
+ * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
*/
#include <stdio.h>
@@ -452,8 +452,12 @@ iter_dependents_cb(zfs_handle_t *zhp, vo
}
ida->stack = isf.next;
}
+
if (!first && err == 0)
err = ida->func(zhp, ida->data);
+ else
+ zfs_close(zhp);
+
return (err);
}
More information about the svn-src-stable-9
mailing list