Skip to content

Commit 856c995

Browse files
[libomptarget] Add missing elf_end call in elf_common.c
Summary: [libomptarget] Add missing elf_end call in elf_common.c Noticed when reviewing D76843. Reviewers: simoll, jdoerfert, efocht, AndreyChurbanov, grokos, manorom Reviewed By: grokos Subscribers: openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D76874
1 parent 8099e0f commit 856c995

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

openmp/libomptarget/plugins/common/elf_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ static inline int32_t elf_check_machine(__tgt_device_image *image,
4545
// Check if ELF is the right kind.
4646
if (elf_kind(e) != ELF_K_ELF) {
4747
DP("Unexpected ELF type!\n");
48+
elf_end(e);
4849
return 0;
4950
}
5051
Elf64_Ehdr *eh64 = elf64_getehdr(e);

0 commit comments

Comments
 (0)