Skip to content

Commit

Permalink
Merge pull request #2087 from wiredtiger/curindex-release
Browse files Browse the repository at this point in the history
WT-2022.  When non-existent index cursor is opened, release the base table.
  • Loading branch information
agorrod committed Jul 26, 2015
2 parents 7d6075c + ddc08b5 commit 9df72d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cursor/cur_index.c
Expand Up @@ -427,7 +427,11 @@ __wt_curindex_open(WT_SESSION_IMPL *session,
else
namesize = (size_t)(columns - idxname);

WT_RET(__wt_schema_open_index(session, table, idxname, namesize, &idx));
if ((ret = __wt_schema_open_index(
session, table, idxname, namesize, &idx)) != 0) {
__wt_schema_release_table(session, table);
return (ret);
}
WT_RET(__wt_calloc_one(session, &cindex));

cursor = &cindex->iface;
Expand Down

0 comments on commit 9df72d7

Please sign in to comment.