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:
parent
4ef8f7cde6
commit
8c44597820
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user