From ab4232baa7bcc86e90746e13312ac9bda1772872 Mon Sep 17 00:00:00 2001 From: Xiaowei Chen Date: Tue, 8 Sep 2015 06:58:57 -0400 Subject: rgw: init_rados failed leads to repeated delete Fixes: #12978 Signed-off-by: Xiaowei Chen --- src/rgw/rgw_rados.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/rgw') diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index c23a2db3ee7..70e806b08ae 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -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; -- cgit v1.2.3