diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-03-21 10:34:25 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-03-21 10:34:25 -0400 |
commit | 15a5d8977b1bfb360a2cfb498c7f469c49d74cab (patch) | |
tree | 51a21d0561a95cfc518391b76721ec1f08f9bb77 /src/conn/conn_open.c | |
parent | 17d838b291b285d2a1510730412a9a4ba3e99bd3 (diff) | |
download | mongo-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/conn/conn_open.c')
-rw-r--r-- | src/conn/conn_open.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conn/conn_open.c b/src/conn/conn_open.c index 0a3d35ac0b1..86f62e176ad 100644 --- a/src/conn/conn_open.c +++ b/src/conn/conn_open.c @@ -149,7 +149,7 @@ __wt_connection_close(WT_CONNECTION_IMPL *conn) __wt_errx(session, "Connection has open file handles: %s", fh->name); - WT_TRET(__wt_close(session, fh)); + WT_TRET(__wt_close(session, &fh)); fh = SLIST_FIRST(&conn->fhlh); } |