From 59bd6711a47c354117a612dd4ef033d70d449383 Mon Sep 17 00:00:00 2001 From: weiqiaomiao Date: Wed, 1 Jun 2016 17:20:49 +0800 Subject: [PATCH] rgw:fix memory leaks Signed-off-by: weiqiaomiao (cherry picked from commit 73e5be2b6133cf4caa0e5e5c8c9eae748b785dbf) --- src/rgw/rgw_data_sync.cc | 1 + src/rgw/rgw_sync.cc | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index b7957e5fa6c83..28e703629c300 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -367,6 +367,7 @@ public: int request_complete() { int ret = http_op->wait(result); + http_op->put(); if (ret < 0 && ret != -ENOENT) { ldout(sync_env->store->ctx(), 0) << "ERROR: failed to list remote datalog shard, ret=" << ret << dendl; return ret; diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index 4ff9d1944d639..4617cd9dd05ac 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -494,6 +494,7 @@ public: } yield { int ret = http_op->wait(shard_info); + http_op->put(); if (ret < 0) { return set_cr_error(ret); } @@ -558,6 +559,7 @@ public: int request_complete() { int ret = http_op->wait(result); + http_op->put(); if (ret < 0 && ret != -ENOENT) { ldout(sync_env->store->ctx(), 0) << "ERROR: failed to list remote mdlog shard, ret=" << ret << dendl; return ret; @@ -951,6 +953,7 @@ public: } yield { int ret = http_op->wait_bl(pbl); + http_op->put(); if (ret < 0) { return set_cr_error(ret); } -- 2.47.3