From a3a3f4f5883f3fc2bf47a7ebfa538206b7ab51d9 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Fri, 29 Apr 2016 13:04:13 -0700 Subject: [PATCH] rgw: rest crs, explicitly call cleanup Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_cr_rest.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/rgw/rgw_cr_rest.h b/src/rgw/rgw_cr_rest.h index d6cc8ab389b..c10592a0064 100644 --- a/src/rgw/rgw_cr_rest.h +++ b/src/rgw/rgw_cr_rest.h @@ -25,6 +25,10 @@ public: path(_path), params(make_param_list(params)), result(_result) {} + ~RGWReadRESTResourceCR() { + request_cleanup(); + } + int send_request() { auto op = boost::intrusive_ptr( new RGWRESTReadResource(conn, path, params, NULL, http_manager)); @@ -55,6 +59,7 @@ public: void request_cleanup() { if (http_op) { http_op->put(); + http_op = NULL; } } }; @@ -79,6 +84,10 @@ public: input(_input) {} + ~RGWPostRESTResourceCR() { + request_cleanup(); + } + int send_request() { auto op = boost::intrusive_ptr( new RGWRESTPostResource(conn, path, params, NULL, http_manager)); @@ -126,6 +135,7 @@ public: void request_cleanup() { if (http_op) { http_op->put(); + http_op = NULL; } } }; -- 2.39.5