From: Sage Weil Date: Thu, 3 Dec 2009 23:50:21 +0000 (-0800) Subject: ceph: fix message leaks X-Git-Tag: v0.18~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=25e8202f69969711cbd4d55a761169ae2b6d57a3;p=ceph.git ceph: fix message leaks --- diff --git a/src/ceph.cc b/src/ceph.cc index cc476f99341..6ac28fa54e3 100644 --- a/src/ceph.cc +++ b/src/ceph.cc @@ -96,6 +96,7 @@ void handle_observe(MMonObserve *observe) lock.Lock(); registered.insert(observe->machine_id); lock.Unlock(); + delete observe; } void handle_notify(MMonObserveNotify *notify) @@ -223,6 +224,8 @@ void handle_notify(MMonObserveNotify *notify) } map_ver[notify->machine_id] = notify->ver; + + delete notify; } static void send_observe_requests(); @@ -299,7 +302,7 @@ void handle_ack(MMonCommandAck *ack) which++; which = which % LAST; - if(ack->version > last_seen_version) + if (ack->version > last_seen_version) last_seen_version = ack->version; string w = ack->cmd[0]; @@ -336,6 +339,7 @@ void handle_ack(MMonCommandAck *ack) } lock.Unlock(); } + delete ack; } void send_command()