aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/spa_errlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/spa_errlog.c')
-rw-r--r--module/zfs/spa_errlog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/spa_errlog.c b/module/zfs/spa_errlog.c
index 21abc8339..35853e282 100644
--- a/module/zfs/spa_errlog.c
+++ b/module/zfs/spa_errlog.c
@@ -183,8 +183,10 @@ process_error_log(spa_t *spa, uint64_t obj, void *addr, size_t *count)
if (copyout(&zb, (char *)addr +
(*count - 1) * sizeof (zbookmark_t),
- sizeof (zbookmark_t)) != 0)
+ sizeof (zbookmark_t)) != 0) {
+ zap_cursor_fini(&zc);
return (SET_ERROR(EFAULT));
+ }
*count -= 1;
}