Merge pull request #742 from joe-lawrence/valgrind_elf_update

kpatch-build: clear Elf_Data d_buf buffer on allocation
This commit is contained in:
Josh Poimboeuf 2017-10-04 11:54:56 -05:00 committed by GitHub
commit f4271491af

View File

@ -626,6 +626,7 @@ struct section *create_section_pair(struct kpatch_elf *kelf, char *name,
sec->data->d_buf = malloc(size);
if (!sec->data->d_buf)
ERROR("malloc");
memset(sec->data->d_buf, 0, size);
sec->data->d_size = size;
sec->data->d_type = ELF_T_BYTE;