mirror of
https://github.com/ceph/ceph
synced 2025-02-19 08:57:27 +00:00
msg/DispatchQueue: fix message leak from discard_queue()
We need to drop the Message ref() here; the msgr owns one ref independent of those from the intrusive_ptr's in the queue itself. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
183953e14b
commit
c4caf871aa
@ -127,8 +127,9 @@ void DispatchQueue::discard_queue(uint64_t id) {
|
||||
i != removed.end();
|
||||
++i) {
|
||||
assert(!(i->is_code())); // We don't discard id 0, ever!
|
||||
msgr->dispatch_throttle_release(
|
||||
i->get_message()->get_dispatch_throttle_size());
|
||||
Message *m = i->get_message();
|
||||
msgr->dispatch_throttle_release(m->get_dispatch_throttle_size());
|
||||
m->put();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user