1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

gcc-fanalyzer: zallocate memory for clean buffer

This commit is contained in:
Zdenek Kabelac 2021-09-21 18:36:44 +02:00
parent 4ef8f7cde6
commit 8c44597820

View File

@ -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))) if (!dm_strncpy(hint.vgname, vgname + 3, sizeof(hint.vgname)))
continue; continue;
if (!(alloc_hint = malloc(sizeof(struct hint)))) { if (!(alloc_hint = zalloc(sizeof(struct hint)))) {
ret = 0; ret = 0;
break; break;
} }