summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/flash/nor/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c
index 67fd78bf..fe5372b6 100644
--- a/src/flash/nor/core.c
+++ b/src/flash/nor/core.c
@@ -401,7 +401,7 @@ int flash_write_unlock(struct target *target, struct image *image,
}
/* allocate padding array */
- padding = malloc(image->num_sections * sizeof(padding));
+ padding = calloc(image->num_sections, sizeof(*padding));
/* loop until we reach end of the image */
while (section < image->num_sections)