summaryrefslogtreecommitdiff
path: root/src/block
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-03-21 10:34:25 -0400
committerKeith Bostic <keith@wiredtiger.com>2015-03-21 10:34:25 -0400
commit15a5d8977b1bfb360a2cfb498c7f469c49d74cab (patch)
tree51a21d0561a95cfc518391b76721ec1f08f9bb77 /src/block
parent17d838b291b285d2a1510730412a9a4ba3e99bd3 (diff)
downloadmongo-15a5d8977b1bfb360a2cfb498c7f469c49d74cab.tar.gz
Pass __wt_close() a reference to the WT_FH memory, that way it gets
cleared and we don't have to do special handling in the caller's to decide whether or not we need to close on an error path, that is: ret = __wt_close(session, fh); fh = NULL; WT_ERR(ret); is no longer necessary to avoid multiple closes in error paths.
Diffstat (limited to 'src/block')
-rw-r--r--src/block/block_open.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/block/block_open.c b/src/block/block_open.c
index 386186d6522..83df5556ac4 100644
--- a/src/block/block_open.c
+++ b/src/block/block_open.c
@@ -37,7 +37,7 @@ __wt_block_manager_truncate(
WT_ERR(__wt_fsync(session, fh));
/* Close the file handle. */
-err: WT_TRET(__wt_close(session, fh));
+err: WT_TRET(__wt_close(session, &fh));
return (ret);
}
@@ -67,7 +67,7 @@ __wt_block_manager_create(
WT_TRET(__wt_fsync(session, fh));
/* Close the file handle. */
- WT_TRET(__wt_close(session, fh));
+ WT_TRET(__wt_close(session, &fh));
/*
* If checkpoint syncing is enabled, some filesystems require that we
@@ -105,7 +105,7 @@ __block_destroy(WT_SESSION_IMPL *session, WT_BLOCK *block)
__wt_free(session, block->name);
if (block->fh != NULL)
- WT_TRET(__wt_close(session, block->fh));
+ WT_TRET(__wt_close(session, &block->fh));
__wt_spin_destroy(session, &block->live_lock);