Memory leak in dsl_destroy_snapshots_nvl error case

The dsl_destroy_snapshots_nvl() function has an early error out, 
and temporary nvlists were not freed.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Jorgen Lundman <lundman@lundman.net>
Closes #10366
This commit is contained in:
Jorgen Lundman 2020-05-27 08:13:41 +09:00 committed by GitHub
parent d1b84da8c1
commit 70a5fc0530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -661,6 +661,8 @@ dsl_destroy_snapshots_nvl(nvlist_t *snaps, boolean_t defer,
if (errorstr != NULL) {
zfs_dbgmsg(errorstr);
}
fnvlist_free(wrapper);
fnvlist_free(result);
return (error);
}
fnvlist_free(wrapper);