We should return -ENOMEM instead of ENOMEM when realloc fails. Signed-off-by: Qiang Huang <h.huangqi...@huawei.com> --- src/lxc/arguments.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/arguments.c b/src/lxc/arguments.c index 5f1c1af..8a8d306 100644 --- a/src/lxc/arguments.c +++ b/src/lxc/arguments.c @@ -164,7 +164,7 @@ static int lxc_arguments_lxcpath_add(struct lxc_arguments *args, sizeof(args->lxcpath[0])); if (args->lxcpath == NULL) { lxc_error(args, "no memory"); - return ENOMEM; + return -ENOMEM; } args->lxcpath[args->lxcpath_cnt++] = lxcpath; return 0; -- 1.8.2.2 ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel