diff options
author | Matt Kangas <matt.kangas@mongodb.com> | 2014-12-12 10:56:37 -0500 |
---|---|---|
committer | Matt Kangas <matt.kangas@mongodb.com> | 2014-12-12 10:56:37 -0500 |
commit | d3877ceca348713dc4d4347249a3976ee466edd3 (patch) | |
tree | a3ebc6344fc7fc8332f4da12057208660bd96d9d /src/third_party/wiredtiger/src/conn/conn_open.c | |
parent | 6b6471ea34f384e747eeef83dfdfcaee1b332bd0 (diff) | |
download | mongo-d3877ceca348713dc4d4347249a3976ee466edd3.tar.gz |
Import wiredtiger-wiredtiger-2.8-rc2-171-g378f727.tar.gz from wiredtiger branch mongodb-2.8
Diffstat (limited to 'src/third_party/wiredtiger/src/conn/conn_open.c')
-rw-r--r-- | src/third_party/wiredtiger/src/conn/conn_open.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/src/conn/conn_open.c b/src/third_party/wiredtiger/src/conn/conn_open.c index b4450b62bf4..f77f38ee01c 100644 --- a/src/third_party/wiredtiger/src/conn/conn_open.c +++ b/src/third_party/wiredtiger/src/conn/conn_open.c @@ -124,7 +124,7 @@ __wt_connection_close(WT_CONNECTION_IMPL *conn) * has completed then shut down the log manager (only after closing * data handles). */ - if (conn->logging) { + if (FLD_ISSET(conn->log_flags, WT_CONN_LOG_ENABLED)) { WT_TRET(__wt_txn_checkpoint_log( session, 1, WT_TXN_LOG_CKPT_STOP, NULL)); WT_TRET(__wt_logmgr_destroy(session)); @@ -196,8 +196,17 @@ __wt_connection_close(WT_CONNECTION_IMPL *conn) */ if ((s = conn->sessions) != NULL) for (i = 0; i < conn->session_size; ++s, ++i) - if (s != session) + if (s != session) { + /* + * If hash arrays were allocated, + * free them now. + */ + if (s->dhhash != NULL) + __wt_free(session, s->dhhash); + if (s->tablehash != NULL) + __wt_free(session, s->tablehash); __wt_free(session, s->hazard); + } /* Destroy the handle. */ WT_TRET(__wt_connection_destroy(conn)); |