diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2013-09-30 15:40:02 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-09-30 15:40:02 -0700 |
commit | 46057925a8d409e70d29a073fe2afaff94333c36 (patch) | |
tree | ff5962f31ea6d1c55a370dff980ca66792f638f9 | |
parent | 1fc24ffb1243e4de73fd4a02d8b934a12cf51fd1 (diff) | |
download | ceph-46057925a8d409e70d29a073fe2afaff94333c36.tar.gz |
librados: pool async create / delete does not delete completion handle
Backport: dumpling
The pool async delete / create function used to delete the internal
completion object. However, caller still holds the allocated completion
object, which it can't drop a reference to (as it'd try to deallocate
the already freed internal object). This fix removes the internal object
deletion, a following commit will fix a related leak (#6444) by having
the application (radosgw) drop the reference even if got an error.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r-- | src/librados/RadosClient.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/librados/RadosClient.cc b/src/librados/RadosClient.cc index 8a5f499ec15..1be3ebd10f9 100644 --- a/src/librados/RadosClient.cc +++ b/src/librados/RadosClient.cc @@ -459,7 +459,6 @@ int librados::RadosClient::pool_create_async(string& name, PoolAsyncCompletionIm Context *onfinish = new C_PoolAsync_Safe(c); int r = objecter->create_pool(name, onfinish, auid, crush_rule); if (r < 0) { - delete c; delete onfinish; } return r; @@ -505,7 +504,6 @@ int librados::RadosClient::pool_delete_async(const char *name, PoolAsyncCompleti Context *onfinish = new C_PoolAsync_Safe(c); int r = objecter->delete_pool(tmp_pool_id, onfinish); if (r < 0) { - delete c; delete onfinish; } return r; |