diff options
Diffstat (limited to 'src/target/avr32_ap7k.c')
-rw-r--r-- | src/target/avr32_ap7k.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/avr32_ap7k.c b/src/target/avr32_ap7k.c index 70af8c3e..e1812ecc 100644 --- a/src/target/avr32_ap7k.c +++ b/src/target/avr32_ap7k.c @@ -178,7 +178,7 @@ static struct reg_cache *avr32_build_reg_cache(struct target *target) struct avr32_ap7k_common *ap7k = target_to_ap7k(target); struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache); struct reg_cache *cache = malloc(sizeof(struct reg_cache)); - struct reg *reg_list = malloc(sizeof(struct reg) * num_regs); + struct reg *reg_list = calloc(num_regs, sizeof(struct reg)); struct avr32_core_reg *arch_info = malloc(sizeof(struct avr32_core_reg) * num_regs); int i; |