Commit fac80c8f by Michel Normand Committed by Daniel Lezcano

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 fa9ab205Signed-off-by: 's avatarMichel Normand <michel.mno@free.fr> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 7115cb78
...@@ -205,7 +205,7 @@ int main(int argc, char *argv[]) ...@@ -205,7 +205,7 @@ int main(int argc, char *argv[])
return -1; return -1;
} }
if (!asprintf(&pid_name, "%d", pid)) { if (asprintf(&pid_name, "%d", pid) == -1) {
ERROR("pid_name: failed to allocate memory"); ERROR("pid_name: failed to allocate memory");
return -1; return -1;
} }
......
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