[Openmp-commits] [PATCH] D76874: [libomptarget] Add missing elf_end call in elf_common.c

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Mar 26 11:55:25 PDT 2020


JonChesterfield created this revision.
JonChesterfield added reviewers: simoll, jdoerfert, efocht, AndreyChurbanov, grokos, manorom.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.

[libomptarget] Add missing elf_end call in elf_common.c
Noticed when reviewing D76843 <https://reviews.llvm.org/D76843>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76874

Files:
  openmp/libomptarget/plugins/common/elf_common.c


Index: openmp/libomptarget/plugins/common/elf_common.c
===================================================================
--- openmp/libomptarget/plugins/common/elf_common.c
+++ openmp/libomptarget/plugins/common/elf_common.c
@@ -45,6 +45,7 @@
   // Check if ELF is the right kind.
   if (elf_kind(e) != ELF_K_ELF) {
     DP("Unexpected ELF type!\n");
+    elf_end(e);
     return 0;
   }
   Elf64_Ehdr *eh64 = elf64_getehdr(e);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76874.252921.patch
Type: text/x-patch
Size: 430 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200326/24f6078c/attachment.bin>


More information about the Openmp-commits mailing list