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:
parent
12707adac8
commit
5b3fbccab9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user