summaryrefslogtreecommitdiffstats
path: root/lib/libzfs
diff options
context:
space:
mode:
authorTim Crawford <[email protected]>2017-04-19 19:36:32 -0400
committerBrian Behlendorf <[email protected]>2017-04-19 16:36:32 -0700
commitad7e908ad52b96edf52167670b970483c3c2b95a (patch)
treea17be445c938b32b89c50b278d4ddeacdc884838 /lib/libzfs
parent066753103feac707b1b6b0e0032a0ca9b0f764ea (diff)
Fix leak in send_iterate_fs
Fix a leak when generating a replication stream of a cloned dataset. Reviewed-by: Matt Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Tim Crawford <[email protected]> Closes #6034
Diffstat (limited to 'lib/libzfs')
-rw-r--r--lib/libzfs/libzfs_sendrecv.c2
1 files changed, 2 insertions, 0 deletions
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 */