diff options
author | Susan LoVerso <sue@wiredtiger.com> | 2014-05-08 13:30:33 -0400 |
---|---|---|
committer | Susan LoVerso <sue@wiredtiger.com> | 2014-05-08 13:30:33 -0400 |
commit | b6251a63958a38d3da52c5e112e96193e6a7d94d (patch) | |
tree | dc29f261b86e956797e875d1f78ebd63aa3d188a /src/async | |
parent | b3d9b2e7cdf43c64e479e9f123298ddae022ce7d (diff) | |
download | mongo-b6251a63958a38d3da52c5e112e96193e6a7d94d.tar.gz |
Valgrind - free ops key/value buffers and work queue.
Diffstat (limited to 'src/async')
-rw-r--r-- | src/async/async_api.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/async/async_api.c b/src/async/async_api.c index 963bb44baa7..c99e9b3846c 100644 --- a/src/async/async_api.c +++ b/src/async/async_api.c @@ -287,6 +287,7 @@ __wt_async_destroy(WT_CONNECTION_IMPL *conn) { WT_ASYNC *async; WT_ASYNC_FORMAT *af, *afnext; + WT_ASYNC_OP *op; WT_DECL_RET; WT_SESSION *wt_session; WT_SESSION_IMPL *session; @@ -312,6 +313,15 @@ __wt_async_destroy(WT_CONNECTION_IMPL *conn) WT_TRET(wt_session->close(wt_session, NULL)); async->worker_sessions[i] = NULL; } + /* Free any op key/value buffers. */ + for (i = 0; i < conn->async_size; i++) { + op = (WT_ASYNC_OP *)&async->async_ops[i]; + if (op->c.key.data != NULL) + __wt_buf_free(session, &op->c.key); + if (op->c.value.data != NULL) + __wt_buf_free(session, &op->c.value); + } + /* Free format resources */ af = STAILQ_FIRST(&async->formatqh); while (af != NULL) { @@ -323,6 +333,7 @@ __wt_async_destroy(WT_CONNECTION_IMPL *conn) __wt_free(session, af); af = afnext; } + __wt_free(session, async->async_queue); __wt_free(session, async->async_ops); __wt_spin_destroy(session, &async->ops_lock); __wt_free(session, conn->async); |