From 7b438e131bb472da35bc1b4c2fbb97809a91d444 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Fri, 24 May 2013 14:29:14 +0200 Subject: [PATCH] kv_flat_btree_async.cc: fix resource leak Call AioCompletion::release() if the completion is no longer needed to free the resources. CID 727983 : Resource leak (RESOURCE_LEAK) leaked_storage: Variable "aioc" going out of scope leaks the storage it points to. Signed-off-by: Danny Al-Gaaf --- src/key_value_store/kv_flat_btree_async.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/key_value_store/kv_flat_btree_async.cc b/src/key_value_store/kv_flat_btree_async.cc index c79555e7de99..663fcde44dbf 100644 --- a/src/key_value_store/kv_flat_btree_async.cc +++ b/src/key_value_store/kv_flat_btree_async.cc @@ -1815,6 +1815,7 @@ int KvFlatBtreeAsync::set_many(const map &in_map) { io_ctx.aio_exec(index_name, aioc, "kvs", "read_many", inbl, &outbl); aioc->wait_for_safe(); err = aioc->get_return_value(); + aioc->release(); if (err < 0) { cerr << "getting index failed with " << err << std::endl; return err; -- 2.47.3