Merge pull request #960 from wwheart/master

kpatch-elf: fix the unexpected elf class
This commit is contained in:
Joe Lawrence 2019-05-15 10:22:41 -04:00 committed by GitHub
commit d40ecd6835
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -765,7 +765,7 @@ void kpatch_write_output_elf(struct kpatch_elf *kelf, Elf *elf, char *outfile)
if (!elfout)
ERROR("elf_begin");
if (!gelf_newehdr(elfout, gelf_getclass(kelf->elf)))
if (!gelf_newehdr(elfout, gelf_getclass(elf)))
ERROR("gelf_newehdr");
if (!gelf_getehdr(elfout, &ehout))