}
}
- symtab = xmalloc_array(struct livepatch_symbol, nsyms);
- strtab = xmalloc_array(char, strtab_len);
+ symtab = xzalloc_array(struct livepatch_symbol, nsyms);
+ strtab = xzalloc_array(char, strtab_len);
if ( !strtab || !symtab )
{
int rc;
/* livepatch_elf_load sanity checked e_shnum. */
- sec = xmalloc_array(struct livepatch_elf_sec, elf->hdr->e_shnum);
+ sec = xzalloc_array(struct livepatch_elf_sec, elf->hdr->e_shnum);
if ( !sec )
{
dprintk(XENLOG_ERR, LIVEPATCH"%s: Could not allocate memory for section table!\n",
/* No need to check values as elf_resolve_sections did it. */
nsym = symtab_sec->sec->sh_size / symtab_sec->sec->sh_entsize;
- sym = xmalloc_array(struct livepatch_elf_sym, nsym);
+ sym = xzalloc_array(struct livepatch_elf_sym, nsym);
if ( !sym )
{
dprintk(XENLOG_ERR, LIVEPATCH "%s: Could not allocate memory for symbols\n",