From: Yehuda Sadeh Date: Tue, 3 May 2016 17:01:33 +0000 (-0700) Subject: rgw: RGWReadRESTResourceCR, fix refcounting X-Git-Tag: v10.2.1~39^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cbea993562b03f75ceb0bdb7c02d72e5b51ae0fa;p=ceph.git rgw: RGWReadRESTResourceCR, fix refcounting Signed-off-by: Yehuda Sadeh (cherry picked from commit d1ec31def71505dc95139fbdd3b49c92fec1d296) --- diff --git a/src/rgw/rgw_cr_rest.h b/src/rgw/rgw_cr_rest.h index d4d344f5a3b..4958c45ff72 100644 --- a/src/rgw/rgw_cr_rest.h +++ b/src/rgw/rgw_cr_rest.h @@ -39,6 +39,7 @@ public: if (ret < 0) { log_error() << "failed to send http operation: " << op->to_str() << " ret=" << ret << std::endl; + op->put(); return ret; } std::swap(http_op, op); // store reference in http_op on success @@ -51,8 +52,10 @@ public: if (ret < 0) { error_stream << "http operation failed: " << op->to_str() << " status=" << op->get_http_status() << std::endl; + op->put(); return ret; } + op->put(); return 0; }