Skip to content

Commit

Permalink
Memory leak in dsl_destroy_snapshots_nvl error case
Browse files Browse the repository at this point in the history
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 openzfs#10366
  • Loading branch information
lundman authored and jsai20 committed Mar 30, 2021
1 parent ccc301b commit 152081b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions module/zfs/dsl_destroy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 152081b

Please sign in to comment.