1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

hints: check for malloc failure

This commit is contained in:
David Teigland 2019-08-28 12:39:50 -05:00
parent 12707adac8
commit 5b3fbccab9

View File

@ -608,7 +608,8 @@ static void _filter_to_str(struct cmd_context *cmd, int filter_cfg, char **strp)
return;
}
str = malloc(len);
if (!(str = malloc(len)))
return;
memset(str, 0, len);
for (cv = cn->v; cv; cv = cv->next) {