[lxc-devel] [PATCH 4/4] lxc: lxc-unshare asprintf error checking
Michel Normand
michel.mno at free.fr
Sat May 29 13:28:38 UTC 2010
same correction in lxc_unshare.c as already done
in lxc_start.c and lxc_restart.c by Nathan in
commit fa9ab20562649707d44bfff90df44b7bc1a9f8b3
Signed-off-by: Michel Normand <michel.mno at free.fr>
---
src/lxc/lxc_unshare.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/lxc/lxc_unshare.c b/src/lxc/lxc_unshare.c
index 10654f7..45494ae 100644
--- a/src/lxc/lxc_unshare.c
+++ b/src/lxc/lxc_unshare.c
@@ -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;
}
--
1.7.0.4
More information about the lxc-devel
mailing list