Fix leak in send_iterate_fs

Fix a leak when generating a replication stream of a cloned dataset.

Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Tim Crawford <tcrawford@datto.com>
Closes #6034
This commit is contained in:
Tim Crawford 2017-04-19 19:36:32 -04:00 committed by Brian Behlendorf
parent 066753103f
commit ad7e908ad5
1 changed files with 2 additions and 0 deletions

View File

@ -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 */