2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 21:15:17 +00:00

lxc-unshare asprintf error checking

same correction in lxc_unshare.c as already done
in lxc_start.c and lxc_restart.c by Nathan in
commit fa9ab20562

Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
Michel Normand
2010-05-31 11:56:47 +02:00
committed by Daniel Lezcano
parent 7115cb787d
commit fac80c8f42

View File

@@ -205,7 +205,7 @@ int main(int argc, char *argv[])
return -1;
}
if (!asprintf(&pid_name, "%d", pid)) {
if (asprintf(&pid_name, "%d", pid) == -1) {
ERROR("pid_name: failed to allocate memory");
return -1;
}