aboutsummaryrefslogtreecommitdiff
path: root/src/target/lakemont.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/lakemont.c')
-rw-r--r--src/target/lakemont.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/lakemont.c b/src/target/lakemont.c
index 70c785c6..f3795c18 100644
--- a/src/target/lakemont.c
+++ b/src/target/lakemont.c
@@ -375,7 +375,7 @@ struct reg_cache *lakemont_build_reg_cache(struct target *t)
int num_regs = ARRAY_SIZE(regs);
struct reg_cache **cache_p = register_get_last_cache_p(&t->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 lakemont_core_reg *arch_info = malloc(sizeof(struct lakemont_core_reg) * num_regs);
struct reg_feature *feature;
int i;