From: Yehuda Sadeh Date: Wed, 15 Sep 2010 23:22:29 +0000 (-0700) Subject: rgw: fix cleanup for certain ops X-Git-Tag: v0.21.3~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=52f83d9e2d2d44f80dfce58cc9d96170f04943c4;p=ceph.git rgw: fix cleanup for certain ops This fixes bug #412 --- diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h index 7fbca2487838..a993afd27736 100644 --- a/src/rgw/rgw_op.h +++ b/src/rgw/rgw_op.h @@ -74,13 +74,24 @@ public: virtual void init(struct req_state *s) { RGWOp::init(s); + range_str = NULL; + if_mod = NULL; + if_unmod = NULL; + if_match = NULL; + if_nomatch = NULL; ofs = 0; len = 0; total_len = 0; end = -1; + mod_time = 0; + lastmod = 0; + unmod_time = 0; mod_ptr = NULL; unmod_ptr = NULL; + attrs.clear(); data = NULL; + ret = 0; + get_data = false; } void set_get_data(bool get_data) { this->get_data = get_data; @@ -99,6 +110,7 @@ protected: public: virtual void init(struct req_state *s) { RGWOp::init(s); + buckets.clear(); } RGWListBuckets() {} ~RGWListBuckets() {} diff --git a/src/rgw/rgw_user.h b/src/rgw/rgw_user.h index 1fc4ec3f2454..6cfda3021c34 100644 --- a/src/rgw/rgw_user.h +++ b/src/rgw/rgw_user.h @@ -97,6 +97,11 @@ public: * Get the user's buckets as a map. */ map& get_buckets() { return buckets; } + + /** + * Cleanup data structure + */ + void clear() { buckets.clear(); } }; WRITE_CLASS_ENCODER(RGWUserBuckets)