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:
committed by
Daniel Lezcano
parent
7115cb787d
commit
fac80c8f42
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user