2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

criu: use xmalloc()

1. Make sure to use xmalloc() where an error message makes sense
2. Make sure to not ignore if NULL is returned

travis-ci: success for Assorted nitpicks
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Kir Kolyshkin
2016-11-07 13:37:50 -08:00
committed by Pavel Emelyanov
parent d98c19ef0e
commit 01b81f174e

View File

@@ -290,9 +290,8 @@ static int autofs_revisit_options(struct mount_info *pm)
char *str;
int ret = -ENOMEM;
str = malloc(1024);
str = xmalloc(1024);
if (!str) {
pr_err("failed to allocate\n");
return -ENOMEM;
}