]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix various uninit class fields
authorSage Weil <sage@inktank.com>
Thu, 9 May 2013 15:50:18 +0000 (08:50 -0700)
committerSage Weil <sage@inktank.com>
Thu, 9 May 2013 17:48:59 +0000 (10:48 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/rgw/rgw_bucket.h
src/rgw/rgw_rados.cc
src/rgw/rgw_user.cc

index 9eb16cf37070fbe86e054306dd1936dd26d31a5a..e2f4d5eee40518386dcd40cf30cb3718753ad761 100644 (file)
@@ -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);
index 2fdcfe5bebd90edfa958015ab6b908203dc2bafb..67d8b55552780e229a6be2b8ecf94bf07677d6e8 100644 (file)
@@ -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);
index 8a636d1cae371014014d795724cab2cd708e4edc..1d998e2b33829d25d1270a93574ccabd3c128867 100644 (file)
@@ -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();
 }