diff options
author | Sage Weil <sage@inktank.com> | 2013-05-09 08:50:18 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-09 10:48:59 -0700 |
commit | 99958e203273e25056715b3efc13ea0a7c06e271 (patch) | |
tree | 538968a213a2620f24b3e07cf24260cc189b7873 | |
parent | ad073c2b03b03a796753d1fd98ea0df28e75d39b (diff) | |
download | ceph-99958e203273e25056715b3efc13ea0a7c06e271.tar.gz |
rgw: fix various uninit class fields
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/rgw/rgw_bucket.h | 2 | ||||
-rw-r--r-- | src/rgw/rgw_rados.cc | 9 | ||||
-rw-r--r-- | src/rgw/rgw_user.cc | 18 |
3 files changed, 15 insertions, 14 deletions
diff --git a/src/rgw/rgw_bucket.h b/src/rgw/rgw_bucket.h index 9eb16cf3707..e2f4d5eee40 100644 --- a/src/rgw/rgw_bucket.h +++ b/src/rgw/rgw_bucket.h @@ -173,7 +173,7 @@ class RGWBucket private: public: - RGWBucket() : store(NULL), failure(false) {} + RGWBucket() : store(NULL), handle(NULL), failure(false) {} int init(RGWRados *storage, RGWBucketAdminOpState& op_state); int create_bucket(string bucket_str, string& user_id, string& display_name); diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 2fdcfe5bebd..67d8b555527 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2784,9 +2784,12 @@ struct get_obj_data : public RefCountedObject { atomic_t err_code; Throttle throttle; - get_obj_data(CephContext *_cct) : cct(_cct), - total_read(0), lock("get_obj_data"), data_lock("get_obj_data::data_lock"), - throttle(cct, "get_obj_data", cct->_conf->rgw_get_obj_window_size, false) {} + get_obj_data(CephContext *_cct) + : cct(_cct), + rados(NULL), ctx(NULL), + total_read(0), lock("get_obj_data"), data_lock("get_obj_data::data_lock"), + client_cb(NULL), + throttle(cct, "get_obj_data", cct->_conf->rgw_get_obj_window_size, false) {} virtual ~get_obj_data() { } void set_cancelled(int r) { cancelled.set(1); diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index 8a636d1cae3..1d998e2b338 100644 --- a/src/rgw/rgw_user.cc +++ b/src/rgw/rgw_user.cc @@ -526,9 +526,12 @@ static void dump_user_info(Formatter *f, RGWUserInfo &info) RGWAccessKeyPool::RGWAccessKeyPool(RGWUser* usr) { user = usr; + swift_keys = NULL; + access_keys = NULL; if (!user) { keys_allowed = false; + store = NULL; return; } @@ -987,13 +990,10 @@ int RGWAccessKeyPool::remove(RGWUserAdminOpState& op_state, std::string *err_msg RGWSubUserPool::RGWSubUserPool(RGWUser *usr) { - if (!usr) - subusers_allowed = false; - - subusers_allowed = true; - + subusers_allowed = (usr != NULL); store = usr->get_store(); user = usr; + subuser_map = NULL; } RGWSubUserPool::~RGWSubUserPool() @@ -1276,10 +1276,8 @@ int RGWSubUserPool::modify(RGWUserAdminOpState& op_state, std::string *err_msg, RGWUserCapPool::RGWUserCapPool(RGWUser *usr) { user = usr; - - if (!user) { - caps_allowed = false; - } + caps = NULL; + caps_allowed = (user != NULL); } RGWUserCapPool::~RGWUserCapPool() @@ -1392,7 +1390,7 @@ int RGWUserCapPool::remove(RGWUserAdminOpState& op_state, std::string *err_msg, return 0; } -RGWUser::RGWUser() : caps(this), keys(this), subusers(this) +RGWUser::RGWUser() : store(NULL), info_stored(false), caps(this), keys(this), subusers(this) { init_default(); } |