diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2014-03-17 18:17:43 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2014-03-17 18:17:43 +1100 |
commit | c3106e25161aae32d8b0ac373fbed6ade41559dc (patch) | |
tree | 2ccffa655e9f5d9b6ba05c3555cb18ae572c3c58 /src/cursor/cur_dump.c | |
parent | 043b8f874c63fc12c692056116ee621ecb3b4a83 (diff) | |
download | mongo-c3106e25161aae32d8b0ac373fbed6ade41559dc.tar.gz |
Further implementation of metadata cursors.
Diffstat (limited to 'src/cursor/cur_dump.c')
-rw-r--r-- | src/cursor/cur_dump.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cursor/cur_dump.c b/src/cursor/cur_dump.c index a77ede1f0f7..4ea855a9cb9 100644 --- a/src/cursor/cur_dump.c +++ b/src/cursor/cur_dump.c @@ -314,6 +314,7 @@ __wt_curdump_create(WT_CURSOR *child, WT_CURSOR *owner, WT_CURSOR **cursorp) __curdump_close); /* close */ WT_CURSOR *cursor; WT_CURSOR_DUMP *cdump; + WT_DECL_RET; WT_SESSION_IMPL *session; const char *cfg[2]; @@ -337,7 +338,10 @@ __wt_curdump_create(WT_CURSOR *child, WT_CURSOR *owner, WT_CURSOR **cursorp) /* __wt_cursor_init is last so we don't have to clean up on error. */ cfg[0] = WT_CONFIG_BASE(session, session_open_cursor); cfg[1] = NULL; - WT_RET(__wt_cursor_init(cursor, NULL, owner, cfg, cursorp)); + WT_ERR(__wt_cursor_init(cursor, NULL, owner, cfg, cursorp)); + if (0) { +err: __wt_free(session, cursor); + } return (0); } |