From: weiqiaomiao Date: Sat, 22 Jul 2017 00:26:52 +0000 (+0800) Subject: rgw: fix radosgw will crash when service is restarted during lifecycle processing X-Git-Tag: v12.1.2~75^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F16495%2Fhead;p=ceph.git 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 --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 566e5daeb121..19edd2be4dba 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;