From: Danny Al-Gaaf Date: Fri, 24 May 2013 12:29:14 +0000 (+0200) Subject: kv_flat_btree_async.cc: fix resource leak X-Git-Tag: v0.64~52^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7b438e131bb472da35bc1b4c2fbb97809a91d444;p=ceph.git 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 --- 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;