From 698bd95cccd3449e7bac1e951b70e34ad2674100 Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Tue, 22 Dec 2020 22:57:52 +0530 Subject: [PATCH] rgw/lc: Fix use-after-free in RGWLC::process Fixed use-after-free issue with 'rgw::sal::LCSerializer lock' in RGWLC::process. Signed-off-by: Soumya Koduri (cherry picked from commit e54e68ad3c88766ac370dfe2bbb5b123e18a7392) --- src/rgw/rgw_lc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 2275adfe81fc..dd1b9b1b4cca 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -1804,11 +1804,11 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, << dendl; lock->unlock(); - delete lock; ret = bucket_lc_process(entry.bucket, worker, thread_stop_at(), once); bucket_lc_post(index, max_lock_secs, entry, ret, worker); } while(1 && !once); + delete lock; return 0; exit: -- 2.47.3