From f86f73f3f72f81edc498001bc8cc9a0c19884338 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 19 Apr 2016 06:11:09 -0700 Subject: [PATCH] rgw: drop rest op reference in error path Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_cr_rest.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rgw/rgw_cr_rest.h b/src/rgw/rgw_cr_rest.h index 40743488bfb3b..147784f0f1012 100644 --- a/src/rgw/rgw_cr_rest.h +++ b/src/rgw/rgw_cr_rest.h @@ -95,6 +95,7 @@ public: int ret = op->aio_send(bl); if (ret < 0) { lsubdout(cct, rgw, 0) << "ERROR: failed to send post request" << dendl; + op->put(); return ret; } std::swap(http_op, op); // store reference in http_op on success @@ -115,6 +116,7 @@ public: << " status=" << op->get_http_status() << std::endl; lsubdout(cct, rgw, 0) << "ERROR: failed to wait for op, ret=" << ret << ": " << op->to_str() << dendl; + op->put(); return ret; } return 0; -- 2.39.5