summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/layout.c b/layout.c
index 0212699ab..be88428f7 100644
--- a/layout.c
+++ b/layout.c
@@ -355,14 +355,12 @@ const struct romentry *layout_next(
int flashrom_layout_new(struct flashrom_layout **const layout)
{
- *layout = malloc(sizeof(**layout));
+ *layout = calloc(1, sizeof(**layout));
if (!*layout) {
msg_gerr("Error creating layout: %s\n", strerror(errno));
return 1;
}
- const struct flashrom_layout tmp = { 0 };
- **layout = tmp;
return 0;
}