]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/ceph_test_msgr: fix a mem leak
authorKefu Chai <kchai@redhat.com>
Mon, 8 Aug 2016 15:33:34 +0000 (23:33 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 8 Aug 2016 16:12:11 +0000 (00:12 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/msgr/test_msgr.cc

index 2a55393c77956c3ec9e8547f1ea4bc8738aa2fa8..9e71ba612466fc513f3ff61c1fd209b16e6e8206 100644 (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);