diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-02-20 11:53:30 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-02-20 11:53:30 +1100 |
commit | f7c6ad80ccbb7b3e8641a574c47e42444a0d247e (patch) | |
tree | 52ac212fe545bca404598b916974585dac156285 | |
parent | 6270758fc486d6b9abd9fb5e7502af5f4e1e16ea (diff) | |
download | mongo-f7c6ad80ccbb7b3e8641a574c47e42444a0d247e.tar.gz |
In __btree_set_root, initialize newcfg to avoid freeing a bad pointer on error.
-rw-r--r-- | src/btree/bt_root.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/btree/bt_root.c b/src/btree/bt_root.c index b8c53de5cfb..75231a54e21 100644 --- a/src/btree/bt_root.c +++ b/src/btree/bt_root.c @@ -313,6 +313,7 @@ __btree_set_root(WT_SESSION_IMPL *session, const char *filename, const char *v) int ret; key = newv = NULL; + newcfg = NULL; WT_ERR(__wt_scr_alloc(session, 0, &key)); WT_ERR(__wt_buf_fmt(session, key, "file:%s", filename)); |