summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2017-02-23 13:27:38 -0500
committerBrandon Potter <brandon.potter@amd.com>2017-02-23 13:27:38 -0500
commita4c4b4188d9d4add4ff3f2e50dd7acd1e109067a (patch)
tree14c07d32ed5d487ddeaf4d66d5996f7945c3f455 /src
parent41bc2886de7b6055dd530577cc5ec8903dd04658 (diff)
downloadgem5-a4c4b4188d9d4add4ff3f2e50dd7acd1e109067a.tar.xz
base: fix small memory leak in the ELF loader
Diffstat (limited to 'src')
-rw-r--r--src/base/loader/elf_object.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc
index df9134e9e..fe43a7f01 100644
--- a/src/base/loader/elf_object.cc
+++ b/src/base/loader/elf_object.cc
@@ -545,6 +545,8 @@ ElfObject::getSections()
sectionNames.insert(elf_strptr(elf, ehdr.e_shstrndx, shdr.sh_name));
section = elf_getscn(elf, ++sec_idx);
} // while sections
+
+ elf_end(elf);
}
bool