From: Yehuda Sadeh Date: Fri, 29 Apr 2016 20:04:13 +0000 (-0700) Subject: rgw: rest crs, explicitly call cleanup X-Git-Tag: v11.0.0~611^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a3a3f4f5883f3fc2bf47a7ebfa538206b7ab51d9;p=ceph.git rgw: rest crs, explicitly call cleanup Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_cr_rest.h b/src/rgw/rgw_cr_rest.h index d6cc8ab389b9..c10592a0064c 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; } } };