diff options
author | Dario Freddi <dario.freddi@collabora.com> | 2011-11-11 21:35:49 +0100 |
---|---|---|
committer | Dario Freddi <dario.freddi@collabora.com> | 2012-07-03 11:11:23 +0200 |
commit | 2a994c6eedf10eae3e7320e276dfdd268de87b3a (patch) | |
tree | e8908b2935c8f7aced26832a0dc4bf40f672e5d0 | |
parent | 5bf3b0637dea687bf282619d808d33e2347f4815 (diff) |
dbus-tubes: Fix leaks in dbus test
-rw-r--r-- | tests/dbus/dbus-tube-chan.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/dbus/dbus-tube-chan.cpp b/tests/dbus/dbus-tube-chan.cpp index 00f586b9..691df5c7 100644 --- a/tests/dbus/dbus-tube-chan.cpp +++ b/tests/dbus/dbus-tube-chan.cpp @@ -456,7 +456,6 @@ void TestDBusTubeChan::testOfferSuccess() gchar *bobService = g_strdup("org.bob.test"); tp_tests_dbus_tube_channel_peer_connected_no_stream(mChanService, bobService, bobHandle); - g_free(bobService); mExpectedHandle = bobHandle; mExpectedService = QLatin1String("org.bob.test"); @@ -502,6 +501,7 @@ void TestDBusTubeChan::testOfferSuccess() /* as we run several tests here, let's init/cleanup properly */ cleanup(); + g_free (bobService); } } @@ -555,6 +555,8 @@ void TestDBusTubeChan::testOutgoingBusNameMonitoring() QVERIFY(mGotConnectionClosed); QCOMPARE(mChan->busNames().size(), 0); + + g_free (service); } void TestDBusTubeChan::testExtractBusNameMonitoring() @@ -619,6 +621,8 @@ void TestDBusTubeChan::testExtractBusNameMonitoring() // And the signal shouldn't have been called QVERIFY(!mGotConnectionClosed); QVERIFY(!mGotRemoteConnection); + + g_free (service); } void TestDBusTubeChan::testAcceptCornerCases() @@ -739,6 +743,8 @@ void TestDBusTubeChan::testOfferCornerCases() SIGNAL(finished(Tp::PendingOperation *)), SLOT(expectFailure(Tp::PendingOperation*)))); QCOMPARE(mLoop->exec(), 0); + + g_free (service); } void TestDBusTubeChan::cleanup() |