summaryrefslogtreecommitdiff
path: root/ubi-utils
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils')
-rw-r--r--ubi-utils/mtdinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ubi-utils/mtdinfo.c b/ubi-utils/mtdinfo.c
index 5ac95aa..a86abd1 100644
--- a/ubi-utils/mtdinfo.c
+++ b/ubi-utils/mtdinfo.c
@@ -253,6 +253,8 @@ static void print_region_info(const struct mtd_dev_info *mtd)
if (!args.node || (!args.map && mtd->region_cnt == 0))
return;
+ memset(&reginfo, 0, sizeof(reginfo));
+
/* First open the device so we can query it */
fd = open(args.node, O_RDONLY | O_CLOEXEC);
if (fd == -1) {