From 8c4459782000ffe8b6c21a710e15464f5905ab3a Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 21 Sep 2021 18:36:44 +0200 Subject: [PATCH] gcc-fanalyzer: zallocate memory for clean buffer --- lib/label/hints.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/label/hints.c b/lib/label/hints.c index 47236a15a..3dba9f8ec 100644 --- a/lib/label/hints.c +++ b/lib/label/hints.c @@ -821,7 +821,7 @@ static int _read_hint_file(struct cmd_context *cmd, struct dm_list *hints, int * if (!dm_strncpy(hint.vgname, vgname + 3, sizeof(hint.vgname))) continue; - if (!(alloc_hint = malloc(sizeof(struct hint)))) { + if (!(alloc_hint = zalloc(sizeof(struct hint)))) { ret = 0; break; }