summaryrefslogtreecommitdiffstats
path: root/courgette
diff options
context:
space:
mode:
authorpaulgazz@chromium.org <paulgazz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-26 11:11:37 +0000
committerpaulgazz@chromium.org <paulgazz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-26 11:11:37 +0000
commit68f6dcb79442a89bfe07988427d3ac491e1c9477 (patch)
tree191cb0ef2c73b47dafdc22071ae2425e35b8d497 /courgette
parent829579670e76fe39c16b907f016360ba82bc6dd4 (diff)
downloadchromium_src-68f6dcb79442a89bfe07988427d3ac491e1c9477.zip
chromium_src-68f6dcb79442a89bfe07988427d3ac491e1c9477.tar.gz
chromium_src-68f6dcb79442a89bfe07988427d3ac491e1c9477.tar.bz2
Fixed heaptest errors in courgette_unittests
BUG=263748 Review URL: https://chromiumcodereview.appspot.com/19856007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213836 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette')
-rw-r--r--courgette/disassembler_elf_32_x86.cc2
-rw-r--r--courgette/typedrva_unittest.cc4
2 files changed, 6 insertions, 0 deletions
diff --git a/courgette/disassembler_elf_32_x86.cc b/courgette/disassembler_elf_32_x86.cc
index bfd8e83..74496d3 100644
--- a/courgette/disassembler_elf_32_x86.cc
+++ b/courgette/disassembler_elf_32_x86.cc
@@ -167,6 +167,8 @@ CheckBool DisassemblerElf32X86::ParseRel32RelocsFromSection(
#endif
p = rel32 + 4;
continue;
+ } else {
+ delete rel32_rva;
}
}
p += 1;
diff --git a/courgette/typedrva_unittest.cc b/courgette/typedrva_unittest.cc
index 780c392..ea38566 100644
--- a/courgette/typedrva_unittest.cc
+++ b/courgette/typedrva_unittest.cc
@@ -25,6 +25,8 @@ void TypedRVATest::TestRelativeTargetX86(courgette::RVA word,
EXPECT_TRUE(typed_rva->ComputeRelativeTarget(op_pointer));
EXPECT_EQ(typed_rva->relative_target(), expected);
+
+ delete typed_rva;
}
uint32 Read32LittleEndian(const void* address) {
@@ -41,6 +43,8 @@ void TypedRVATest::TestRelativeTargetARM(courgette::ARM_RVA arm_rva,
EXPECT_TRUE(typed_rva->ComputeRelativeTarget(op_pointer));
EXPECT_EQ(rva + typed_rva->relative_target(), expected);
+
+ delete typed_rva;
}
TEST_F(TypedRVATest, TestX86) {