summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-05-28 12:38:57 +0200
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-05-28 12:38:57 +0200
commite6efc39fad434ad4819f4feb6e9d69df48067181 (patch)
tree691689ef35b1a73483e13894c3f5a6dd21e853d4 /src
parenta6df7644b67f1a9aacff153d365acaf3e95afcf2 (diff)
downloadceph-e6efc39fad434ad4819f4feb6e9d69df48067181.tar.gz
kv_flat_btree_async.cc: fix AioCompletion resource leak
Call AioCompletion::release() if the completion is no longer needed. CID 727979 (#1-2 of 2): Resource leak (RESOURCE_LEAK) leaked_storage: Variable "a" 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.cc2
1 files changed, 2 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 77d11b0951c..baef3157cb5 100644
--- a/src/key_value_store/kv_flat_btree_async.cc
+++ b/src/key_value_store/kv_flat_btree_async.cc
@@ -690,12 +690,14 @@ int KvFlatBtreeAsync::read_object(const string &obj, rebalance_args * args) {
if (verbose) cout << "\t\t" << client_name
<< "-read_object: reading failed with "
<< err << std::endl;
+ a->release();
return err;
}
bufferlist::iterator it = outbl.begin();
args->decode(it);
args->odata.name = obj;
args->odata.version = a->get_version();
+ a->release();
return err;
}