diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-28 12:27:37 +0200 |
---|---|---|
committer | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-28 12:27:37 +0200 |
commit | 6939b124929057ce315502e60ef45f13625a8496 (patch) | |
tree | 1a920d91a74347713451a3a3c4f6f49f1d325b0c /src | |
parent | a6df7644b67f1a9aacff153d365acaf3e95afcf2 (diff) | |
download | ceph-6939b124929057ce315502e60ef45f13625a8496.tar.gz |
kv_flat_btree_async.cc: fix AioCompletion resource leak
Call AioCompletion::release() if the completion is no longer
needed.
CID 727980 (#1-4 of 4): 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.cc | 2 |
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..8fb7e5cc96c 100644 --- a/src/key_value_store/kv_flat_btree_async.cc +++ b/src/key_value_store/kv_flat_btree_async.cc @@ -2065,6 +2065,7 @@ bool KvFlatBtreeAsync::is_consistent() { err = aioc->get_return_value(); if (ceph_clock_now(g_ceph_context) - idata.ts > timeout) { if (err < 0) { + aioc->release(); if (err == -ENOENT) { continue; } else { @@ -2083,6 +2084,7 @@ bool KvFlatBtreeAsync::is_consistent() { } } special_names.insert(dit->obj); + aioc->release(); } for(vector<create_data >::iterator cit = idata.to_create.begin(); cit != idata.to_create.end(); ++cit) { |