From ffad2138f6544263cde37b45d61afd322d8e094b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 11 Sep 2010 09:54:09 -0700 Subject: [PATCH] osd: don't leak map_in_progress_cond --- src/osd/OSD.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 448d5a7805912..63b07c3beb568 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -379,9 +379,11 @@ OSD::OSD(int id, Messenger *internal_messenger, Messenger *external_messenger, M remove_wq(this, &disk_tp) { monc->set_messenger(client_messenger); + if (client_messenger != cluster_messenger) map_in_progress_cond = new Cond(); - else map_in_progress_cond = NULL; + else + map_in_progress_cond = NULL; osdmap = 0; @@ -400,6 +402,7 @@ OSD::OSD(int id, Messenger *internal_messenger, Messenger *external_messenger, M OSD::~OSD() { + delete map_in_progress_cond; delete class_handler; delete osdmap; logger_remove(logger); -- 2.39.5