summaryrefslogtreecommitdiff
path: root/src/block
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-05-15 09:20:41 -0400
committerKeith Bostic <keith@wiredtiger.com>2015-05-15 09:20:41 -0400
commit5268a398611622f45a05cba097acc5958c6da4a1 (patch)
tree925668cb087ae0b60d7d21bd3fbe69083e7cc016 /src/block
parent622c0cca7416f148d2c4eea79ef87e606f216281 (diff)
downloadmongo-5268a398611622f45a05cba097acc5958c6da4a1.tar.gz
Don't leak buffer on repeated failure.
Diffstat (limited to 'src/block')
-rw-r--r--src/block/block_open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/block/block_open.c b/src/block/block_open.c
index 1a8a4b1beb3..507a70db156 100644
--- a/src/block/block_open.c
+++ b/src/block/block_open.c
@@ -68,10 +68,10 @@ __wt_block_manager_create(
if ((ret = __wt_open(
session, filename, 1, 1, WT_FILE_TYPE_DATA, &fh)) == 0)
break;
- WT_RET_TEST(ret != EEXIST, ret);
+ WT_ERR_TEST(ret != EEXIST, ret);
if (tmp == NULL)
- WT_RET(__wt_scr_alloc(session, 0, &tmp));
+ WT_ERR(__wt_scr_alloc(session, 0, &tmp));
for (suffix = 1;; ++suffix) {
WT_ERR(__wt_buf_fmt(
session, tmp, "%s.%d", filename, suffix));