diff options
author | Susan LoVerso <sue@mongodb.com> | 2016-02-19 11:57:39 -0500 |
---|---|---|
committer | Susan LoVerso <sue@mongodb.com> | 2016-02-19 11:57:39 -0500 |
commit | 2674be5db00c1220554ec1aa8da38a19fc57d373 (patch) | |
tree | 697ae95f3eaade49ee96a6c8f796e5c5fc4e670f /src/conn/conn_api.c | |
parent | 0649731ce76cf4af4f8be388b2f3f3b002341351 (diff) | |
download | mongo-2674be5db00c1220554ec1aa8da38a19fc57d373.tar.gz |
WT-2349 Revert last change.
Diffstat (limited to 'src/conn/conn_api.c')
-rw-r--r-- | src/conn/conn_api.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/conn/conn_api.c b/src/conn/conn_api.c index 1274c203649..25db2379349 100644 --- a/src/conn/conn_api.c +++ b/src/conn/conn_api.c @@ -1887,7 +1887,7 @@ wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, WT_DECL_RET; const WT_NAME_FLAG *ft; WT_SESSION_IMPL *session; - bool config_base_set; + bool config_base_set, free_merge_cfg; const char *enc_cfg[] = { NULL, NULL }, *merge_cfg; char version[64]; @@ -1899,6 +1899,7 @@ wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, conn = NULL; session = NULL; + free_merge_cfg = false; WT_RET(__wt_library_init()); @@ -2024,20 +2025,12 @@ wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, * read-only are tested in their individual locations later. */ __conn_config_readonly(cfg); - ret = __wt_config_merge(session, cfg, NULL, &conn->cfg); - __wt_free(session, merge_cfg); - WT_ERR(ret); + free_merge_cfg = true; + WT_ERR(__wt_config_merge(session, cfg, NULL, &conn->cfg)); } else conn->cfg = merge_cfg; /* - * At this point we've merged the configuration stack and the final - * stack resides in conn->cfg. Set up the cfg array to use that now. - */ - cfg[0] = conn->cfg; - cfg[1] = NULL; - - /* * Configuration ... * * We can't open sessions yet, so any configurations that cause @@ -2208,6 +2201,8 @@ err: /* Discard the scratch buffers. */ __wt_scr_free(session, &i2); __wt_scr_free(session, &i3); + if (free_merge_cfg) + __wt_free(session, merge_cfg); /* * We may have allocated scratch memory when using the dummy session or * the subsequently created real session, and we don't want to tie down |