mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +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)))
|
||||
continue;
|
||||
|
||||
if (!(alloc_hint = malloc(sizeof(struct hint)))) {
|
||||
if (!(alloc_hint = zalloc(sizeof(struct hint)))) {
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user