summaryrefslogtreecommitdiff
path: root/src/cursor/cur_dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cursor/cur_dump.c')
-rw-r--r--src/cursor/cur_dump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cursor/cur_dump.c b/src/cursor/cur_dump.c
index 595915df7b7..d7f18bb61ac 100644
--- a/src/cursor/cur_dump.c
+++ b/src/cursor/cur_dump.c
@@ -401,13 +401,13 @@ __wt_curdump_create(WT_CURSOR *child, WT_CURSOR *owner, WT_CURSOR **cursorp)
cursor->json_private = child->json_private = json;
}
- /* __wt_cursor_init is last so we don't have to clean up on error. */
cfg[0] = WT_CONFIG_BASE(session, WT_SESSION_open_cursor);
cfg[1] = NULL;
WT_ERR(__wt_cursor_init(cursor, NULL, owner, cfg, cursorp));
if (0) {
-err: __wt_free(session, cursor);
+err: WT_TRET(__curdump_close(cursor));
+ *cursorp = NULL;
}
return (ret);
}