mirror of
https://github.com/dynup/kpatch
synced 2025-02-22 12:56:50 +00:00
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:
commit
f4271491af
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user