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
This commit is contained in:
nealsid 2009-05-14 21:31:03 +00:00
parent dad1acc2d0
commit fc26f4a9b5

View file

@ -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"));