test/ceph_test_msgr: fix a mem leak

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2016-08-08 23:33:34 +08:00
parent cf1801c260
commit 7d7f9b300b

View File

@ -1357,8 +1357,10 @@ class MarkdownDispatcher : public Dispatcher {
Mutex::Locker l(lock);
count.inc();
conns.insert(m->get_connection());
if (conns.size() < 2 && !last_mark)
if (conns.size() < 2 && !last_mark) {
m->put();
return true;
}
last_mark = true;
usleep(rand() % 500);