From: Josh Durgin Date: Mon, 14 Mar 2011 21:20:07 +0000 (-0700) Subject: monclient: fix leak of AuthClientHandler X-Git-Tag: v0.26~141 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=87056e1a5fafa2e58c162f4de3b4819ea09d539f;p=ceph.git monclient: fix leak of AuthClientHandler Signed-off-by: Josh Durgin --- diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index 5b47a2495c08..73f4a2668703 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -39,6 +39,11 @@ #undef dout_prefix #define dout_prefix *_dout << "monclient" << (hunting ? "(hunting)":"") << ": " +MonClient::~MonClient() +{ + if (auth) + delete auth; +} /* * build an initial monmap with any known monitor diff --git a/src/mon/MonClient.h b/src/mon/MonClient.h index 99958818ef35..614c481ef998 100644 --- a/src/mon/MonClient.h +++ b/src/mon/MonClient.h @@ -173,8 +173,7 @@ public: auth(NULL), rotating_secrets(rkeys) { } - ~MonClient() { - } + ~MonClient(); void init(); void shutdown();