From fc26f4a9b5487306b311bb9c5b04e27e2f4e3280 Mon Sep 17 00:00:00 2001 From: nealsid Date: Thu, 14 May 2009 21:31:03 +0000 Subject: Fix memory leak in test case when calling into basic source line resolver. R=brdevmn A=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@338 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/processor/basic_source_line_resolver_unittest.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/processor') diff --git a/src/processor/basic_source_line_resolver_unittest.cc b/src/processor/basic_source_line_resolver_unittest.cc index 95595a85..cea98b84 100644 --- a/src/processor/basic_source_line_resolver_unittest.cc +++ b/src/processor/basic_source_line_resolver_unittest.cc @@ -173,8 +173,10 @@ static bool RunTests() { ASSERT_EQ(frame_info->prolog_size, 1); frame.instruction = 0x216f; - resolver.FillSourceLineInfo(&frame); + StackFrameInfo *s; + s = resolver.FillSourceLineInfo(&frame); ASSERT_EQ(frame.function_name, "Public2_1"); + delete s; ClearSourceLineInfo(&frame); frame.instruction = 0x219f; @@ -184,9 +186,11 @@ static bool RunTests() { frame.instruction = 0x21a0; frame.module = &module2; - resolver.FillSourceLineInfo(&frame); + s = resolver.FillSourceLineInfo(&frame); ASSERT_EQ(frame.function_name, "Public2_2"); + delete s; + ASSERT_FALSE(resolver.LoadModule("module3", testdata_dir + "/module3_bad.out")); ASSERT_FALSE(resolver.HasModule("module3")); -- cgit v1.2.1