From 1f133a2350afedff9e10e725ff23684aaefb43b9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 13 Oct 2017 17:11:38 -0500 Subject: [PATCH] mon/OSDMonitor: reset OSDMap state before decode This ensures we don't have any cruft left over in fields that decode() assumes are initialized from the ctor (and not a previous instance). Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 6a6a29ec23561..fad0d3e4ec3b0 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -343,6 +343,7 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap) get_version_full(latest_full, latest_bl); assert(latest_bl.length() != 0); dout(7) << __func__ << " loading latest full map e" << latest_full << dendl; + osdmap = OSDMap(); osdmap.decode(latest_bl); } -- 2.39.5