base: fix small memory leak in the ELF loader
authorBrandon Potter <brandon.potter@amd.com>
Thu, 23 Feb 2017 18:27:38 +0000 (13:27 -0500)
committerBrandon Potter <brandon.potter@amd.com>
Thu, 23 Feb 2017 18:27:38 +0000 (13:27 -0500)
src/base/loader/elf_object.cc

index df9134e9efb05f6d247de1b42d955bcfb625a39d..fe43a7f01a658db7cc616be4582d2a8385fc2da8 100644 (file)
@@ -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