summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-03-20 18:01:10 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-03-20 18:01:10 -0400
commit96d316e160e747c0f7e98a009dae6eef35a642f5 (patch)
treef7e65dc5fda224dc4d9fafe9d40855d81ecfc30b
parentb178693dc2fd4ee38c5efabef164fec51582e33f (diff)
downloadmongo-96d316e160e747c0f7e98a009dae6eef35a642f5.tar.gz
If we fail to create the statistics cursor, we may still have allocated
a statistics structure for it.
-rw-r--r--src/cursor/cur_stat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cursor/cur_stat.c b/src/cursor/cur_stat.c
index d2509d19eb5..3abbdbb89ac 100644
--- a/src/cursor/cur_stat.c
+++ b/src/cursor/cur_stat.c
@@ -443,7 +443,8 @@ __wt_curstat_open(WT_SESSION_IMPL *session,
WT_ERR(__wt_cursor_init(cursor, uri, NULL, cfg, cursorp));
if (0) {
-err: __wt_free(session, cst);
+err: __wt_free(session, cst->stats);
+ __wt_free(session, cst);
}
return (ret);