From ad7e908ad52b96edf52167670b970483c3c2b95a Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Wed, 19 Apr 2017 19:36:32 -0400 Subject: [PATCH] Fix leak in send_iterate_fs Fix a leak when generating a replication stream of a cloned dataset. Reviewed-by: Matt Ahrens Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Signed-off-by: Tim Crawford Closes #6034 --- lib/libzfs/libzfs_sendrecv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index 07e8da0fd..d008031e5 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -870,6 +870,8 @@ send_iterate_fs(zfs_handle_t *zhp, void *arg) } VERIFY(0 == nvlist_add_uint64(nvfs, "origin", origin->zfs_dmustats.dds_guid)); + + zfs_close(origin); } /* iterate over props */ -- 2.40.0