summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@redhat.com>2016-04-19 15:11:09 +0200
committerYehuda Sadeh <yehuda@redhat.com>2016-04-19 15:11:09 +0200
commitf86f73f3f72f81edc498001bc8cc9a0c19884338 (patch)
treec76aa35c32bc9bc348f9cfaa7f1e427d3c1d27d9
parentrgw: clean async rest ops in calling cr (diff)
downloadceph-f86f73f3f72f81edc498001bc8cc9a0c19884338.tar.xz
ceph-f86f73f3f72f81edc498001bc8cc9a0c19884338.zip
rgw: drop rest op reference in error path
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
-rw-r--r--src/rgw/rgw_cr_rest.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rgw/rgw_cr_rest.h b/src/rgw/rgw_cr_rest.h
index 40743488bfb..147784f0f10 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;