]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: init_rados failed leads to repeated delete 5733/head
authorXiaowei Chen <cxwshawn@gmail.com>
Tue, 8 Sep 2015 10:58:57 +0000 (06:58 -0400)
committerXiaowei Chen <cxwshawn@gmail.com>
Tue, 8 Sep 2015 10:59:00 +0000 (06:59 -0400)
Fixes: #12978
Signed-off-by: Xiaowei Chen <chen.xiaowei@h3c.com>
src/rgw/rgw_rados.cc

index c23a2db3ee7f086cbd548049838c081f20a3165e..70e806b08aec4fa3cdd77044e73ec90856a050e4 100644 (file)
@@ -1508,10 +1508,13 @@ fail:
   for (uint32_t i=0; i < num_rados_handles; i++) {
     if (rados[i]) {
       delete rados[i];
+      rados[i] = NULL;
     }
   }
+  num_rados_handles = 0;
   if (rados) {
     delete[] rados;
+    rados = NULL;
   }
 
   return ret;