Commit 9f064050 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

mount.c: use xstrdup()

We already have a wrapper that spits out an error, use it.

travis-ci: success for Assorted nitpicks
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 56f91edf
......@@ -2275,11 +2275,9 @@ static int create_mnt_roots(void)
goto out;
}
mnt_roots = strdup(".criu.mntns.XXXXXX");
if (mnt_roots == NULL) {
pr_perror("Can't allocate memory");
mnt_roots = xstrdup(".criu.mntns.XXXXXX");
if (mnt_roots == NULL)
goto out;
}
if (mkdtemp(mnt_roots) == NULL) {
pr_perror("Unable to create a temporary directory");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment