summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-05-24 14:29:14 +0200
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-05-24 14:43:17 +0200
commit7b438e131bb472da35bc1b4c2fbb97809a91d444 (patch)
treeaf2801bbc8b990ea337dcac06b5ca122a4188ab5 /src
parentbb407bfd101d9707c63655cb3c1b51346a0de8cd (diff)
downloadceph-7b438e131bb472da35bc1b4c2fbb97809a91d444.tar.gz
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 <danny.al-gaaf@bisect.de>
Diffstat (limited to 'src')
-rw-r--r--src/key_value_store/kv_flat_btree_async.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/key_value_store/kv_flat_btree_async.cc b/src/key_value_store/kv_flat_btree_async.cc
index c79555e7de9..663fcde44db 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<string, bufferlist> &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;