From 70a5fc053033c21098651c59a13ab0ac535579e9 Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Wed, 27 May 2020 08:13:41 +0900 Subject: 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 Signed-off-by: Jorgen Lundman Closes #10366 --- module/zfs/dsl_destroy.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/zfs') diff --git a/module/zfs/dsl_destroy.c b/module/zfs/dsl_destroy.c index 883928f0e..190dbdef5 100644 --- a/module/zfs/dsl_destroy.c +++ b/module/zfs/dsl_destroy.c @@ -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); -- cgit v1.2.3