[lxc-devel] [PATCH] only INFO rcfile if asprintf successfully allocates it
Dwight Engen
dwight.engen at oracle.com
Tue Feb 12 17:52:25 UTC 2013
Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
---
src/lxc/lxc_start.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_start.c b/src/lxc/lxc_start.c
index aac7fe7..9d8db63 100644
--- a/src/lxc/lxc_start.c
+++ b/src/lxc/lxc_start.c
@@ -182,12 +182,12 @@ int main(int argc, char *argv[])
}
rc = asprintf(&rcfile, "%s/%s/config", lxcpath, my_args.name);
- INFO("using rcfile %s", rcfile);
free(lxcpath);
if (rc == -1) {
SYSERROR("failed to allocate memory");
return err;
}
+ INFO("using rcfile %s", rcfile);
/* container configuration does not exist */
if (access(rcfile, F_OK)) {
--
1.7.12.3
More information about the lxc-devel
mailing list