From 008b91c5fb0c3b030ac73f654e11158acbd74419 Mon Sep 17 00:00:00 2001 From: weiqiaomiao Date: Sat, 22 Jul 2017 08:26:52 +0800 Subject: [PATCH] rgw: fix radosgw will crash when service is restarted during lifecycle processing in RGWRados::finalize(), store->gc is destructed before store->lc, if this func is called (by service restart or others) when lifecycle processing, the lifecycle still use store->gc, the radosgw daemon will crash. Fixes: http://tracker.ceph.com/issues/20756 Signed-off-by: Wei Qiaomiao --- src/rgw/rgw_rados.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 566e5daeb12..19edd2be4db 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -3713,14 +3713,14 @@ void RGWRados::finalize() delete async_rados; } + delete lc; + lc = NULL; + delete gc; gc = NULL; delete obj_expirer; obj_expirer = NULL; - - delete lc; - lc = NULL; delete rest_master_conn; -- 2.39.5