Skip to content

Commit

Permalink
kpatch-elf: Free sections in elf teardown
Browse files Browse the repository at this point in the history
Currently, only rela section get freed. This seems like a simple
scope mistake.

Free all sections regardless of their nature in kpatch_elf_teardown()

Signed-off-by: Julien Thierry <jthierry@redhat.com>
  • Loading branch information
Julien Thierry committed Oct 15, 2019
1 parent df57300 commit a02842f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kpatch-build/kpatch-elf.c
Expand Up @@ -852,9 +852,9 @@ void kpatch_elf_teardown(struct kpatch_elf *kelf)
memset(rela, 0, sizeof(*rela));
free(rela);
}
memset(sec, 0, sizeof(*sec));
free(sec);
}
memset(sec, 0, sizeof(*sec));
free(sec);
}

list_for_each_entry_safe(sym, safesym, &kelf->symbols, list) {
Expand Down

0 comments on commit a02842f

Please sign in to comment.