From: Tim Crawford Date: Wed, 19 Apr 2017 23:36:32 +0000 (-0400) Subject: Fix leak in send_iterate_fs X-Git-Tag: zfs-0.7.0-rc4~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad7e908ad52b96edf52167670b970483c3c2b95a;p=zfs 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 --- 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 */