summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornona@chromium.org <nona@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 12:22:31 +0000
committernona@chromium.org <nona@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 12:22:31 +0000
commit41561ca31b9de2e4c1c5fe80aeb86bedb7403536 (patch)
tree1df32176aefcdd12d38522024b7119c416c3e10a
parentb407cd6e2b9bee55baae2a6b5a2d1965b947201d (diff)
downloadchromium_src-41561ca31b9de2e4c1c5fe80aeb86bedb7403536.zip
chromium_src-41561ca31b9de2e4c1c5fe80aeb86bedb7403536.tar.gz
chromium_src-41561ca31b9de2e4c1c5fe80aeb86bedb7403536.tar.bz2
Fix memory leak in IBusConfigClient unittests
BUG=159726 TEST=ran chromeos_unittests with valgrind Review URL: https://chromiumcodereview.appspot.com/11369113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166400 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chromeos/dbus/ibus/ibus_config_client_unittest.cc6
-rw-r--r--tools/heapcheck/suppressions.txt9
-rw-r--r--tools/valgrind/memcheck/suppressions.txt12
3 files changed, 3 insertions, 24 deletions
diff --git a/chromeos/dbus/ibus/ibus_config_client_unittest.cc b/chromeos/dbus/ibus/ibus_config_client_unittest.cc
index c58db0d..840690b 100644
--- a/chromeos/dbus/ibus/ibus_config_client_unittest.cc
+++ b/chromeos/dbus/ibus/ibus_config_client_unittest.cc
@@ -71,9 +71,9 @@ class SetValueVerifierBase {
EXPECT_FALSE(reader.HasMoreData());
if (behavior_ == HANDLER_SUCCESS) {
- dbus::Response* response =
- dbus::Response::FromMethodCall(method_call);
- callback.Run(response);
+ scoped_ptr<dbus::Response> response(
+ dbus::Response::FromMethodCall(method_call));
+ callback.Run(response.get());
} else {
scoped_ptr<dbus::ErrorResponse> error_response(
dbus::ErrorResponse::FromMethodCall(method_call, "Error",
diff --git a/tools/heapcheck/suppressions.txt b/tools/heapcheck/suppressions.txt
index 2e93dea..93133c0 100644
--- a/tools/heapcheck/suppressions.txt
+++ b/tools/heapcheck/suppressions.txt
@@ -1644,12 +1644,3 @@
fun:net::FileStream::Context::Orphan
fun:net::FileStream::~FileStream
}
-{
- bug_159726
- Heapcheck:Leak
- fun:dbus::Response::FromMethodCall
- fun:chromeos::SetValueVerifierBase::Run
- fun:testing::internal::InvokeHelper::InvokeMethod
- ...
- fun:dbus::MockObjectProxy::CallMethodWithErrorCallback
-}
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt
index e43a6d8..20f607c 100644
--- a/tools/valgrind/memcheck/suppressions.txt
+++ b/tools/valgrind/memcheck/suppressions.txt
@@ -6125,18 +6125,6 @@
fun:_ZN7WebCore12RenderObject8setStyleEN3WTF10PassRefPtrINS_11RenderStyleEEE
}
{
- bug_159726
- Memcheck:Leak
- fun:_Znw*
- fun:_ZN4dbus8Response14FromMethodCallEPNS_10MethodCallE
- fun:_ZN8chromeos20SetValueVerifierBase3RunEPN4dbus10MethodCallEiRKN4base8CallbackIFvPNS1_8ResponseEEEERKNS5_IFvPNS1_13ErrorResponseEEEE
- fun:_ZN7testing8internal12InvokeHelperIvNSt3tr15tupleIIPN4dbus10MethodCallEiN4base8CallbackIFvPNS4_8ResponseEEEENS8_IFvPNS4_13ErrorResponseEEEEEEEE12InvokeMethodIN8chromeos*
- fun:_ZNK7testing8internal18InvokeMethodActionIN8chromeos*
- ...
- fun:_ZN4dbus15MockObjectProxy27CallMethodWithErrorCallbackEPNS_10MethodCallEiN4base8CallbackIFvPNS_8ResponseEEEENS4_IFvPNS_13ErrorResponseEEEE
- fun:_ZN8chromeos12_GLOBAL__N_120IBusConfigClientImpl23CallWithDefaultCallbackEPN4dbus10MethodCallERKN4base8CallbackIFvvEEE
-}
-{
bug_159725
Memcheck:Uninitialized
...