From 7d08bbf59526469fbc0ff35938253ea0c74ef4a1 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 6 Feb 2016 23:35:14 +0800 Subject: [PATCH] osd: init HeartbeatDispatcher using OSD->cct its base class 'Dispatcher' is uninitialized when used here to access 'Dispatcher::cct', so we'd better use OSD::cct to initialize it instead. Signed-off-by: Kefu Chai --- src/osd/OSD.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 169623a73d6..e53fc6b640c 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1565,7 +1565,7 @@ public: struct HeartbeatDispatcher : public Dispatcher { OSD *osd; - explicit HeartbeatDispatcher(OSD *o) : Dispatcher(cct), osd(o) {} + explicit HeartbeatDispatcher(OSD *o) : Dispatcher(o->cct), osd(o) {} bool ms_dispatch(Message *m) { return osd->heartbeat_dispatch(m); } -- 2.47.3