From a8a127e2c9f352ba797cd6625d61840b425d6534 Mon Sep 17 00:00:00 2001 From: George Amanakis Date: Thu, 6 Apr 2023 19:46:18 +0200 Subject: [PATCH] Fix typo in check_clones() Run kmem_free() after zap_cursor_fini(). Reviewed-by: Brian Behlendorf Reviewed-by: Tino Reichardt Reviewed-by: Adam Moss Signed-off-by: George Amanakis Closes #14702 --- module/zfs/spa_errlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/spa_errlog.c b/module/zfs/spa_errlog.c index 41cb9d012..af144ef16 100644 --- a/module/zfs/spa_errlog.c +++ b/module/zfs/spa_errlog.c @@ -470,9 +470,9 @@ static int check_clones(spa_t *spa, uint64_t zap_clone, uint64_t snap_count, break; } + zap_cursor_fini(zc); kmem_free(za, sizeof (*za)); kmem_free(zc, sizeof (*zc)); - zap_cursor_fini(zc); return (error); }