mirror of
https://github.com/ceph/ceph
synced 2025-01-03 17:42:36 +00:00
mon: delete Subscriptions, don't just clear them. Fixes minor memory leak.
This commit is contained in:
parent
9c18972dd8
commit
a43897b08e
@ -78,8 +78,10 @@ struct MonSessionMap {
|
||||
|
||||
void remove_session(MonSession *s) {
|
||||
assert(!s->closed);
|
||||
for (map<string,Subscription*>::iterator p = s->sub_map.begin(); p != s->sub_map.end(); ++p)
|
||||
for (map<string,Subscription*>::iterator p = s->sub_map.begin(); p != s->sub_map.end(); ++p) {
|
||||
p->second->type_item.remove_myself();
|
||||
delete p->second;
|
||||
}
|
||||
s->sub_map.clear();
|
||||
s->item.remove_myself();
|
||||
if (s->inst.name.is_osd()) {
|
||||
|
Loading…
Reference in New Issue
Block a user