From: Yehuda Sadeh Date: Tue, 19 Apr 2016 13:11:09 +0000 (-0700) Subject: rgw: drop rest op reference in error path X-Git-Tag: v10.2.0~1^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f86f73f3f72f81edc498001bc8cc9a0c19884338;p=ceph.git rgw: drop rest op reference in error path Signed-off-by: Yehuda Sadeh --- 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;