From 55d81db10aafabebb389453e7e6a10fe51b0c0a3 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 24 May 2019 15:22:50 -0500 Subject: [PATCH] osdc/Objecter: fix OSDMap leak in handle_osd_map If there are threads accessing osdmap unlocked they may walk into freed memory, but that means the caller is buggy: we are holding the rwlock. Fixes: http://tracker.ceph.com/issues/20491 Signed-off-by: Sage Weil --- src/osdc/Objecter.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 7140522237b..a30e1802877 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -1213,6 +1213,7 @@ void Objecter::handle_osd_map(MOSDMap *m) emit_blacklist_events(*osdmap, *new_osdmap); + delete osdmap; osdmap = new_osdmap; logger->inc(l_osdc_map_full); -- 2.39.5