From cbea993562b03f75ceb0bdb7c02d72e5b51ae0fa Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 3 May 2016 10:01:33 -0700 Subject: [PATCH] rgw: RGWReadRESTResourceCR, fix refcounting Signed-off-by: Yehuda Sadeh (cherry picked from commit d1ec31def71505dc95139fbdd3b49c92fec1d296) --- src/rgw/rgw_cr_rest.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rgw/rgw_cr_rest.h b/src/rgw/rgw_cr_rest.h index d4d344f5a3b49..4958c45ff720e 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; } -- 2.39.5