Commit 444f3ca2 by Dwight Engen Committed by Stéphane Graber

only INFO rcfile if asprintf successfully allocates it

parent 64e9369c
...@@ -182,12 +182,12 @@ int main(int argc, char *argv[]) ...@@ -182,12 +182,12 @@ int main(int argc, char *argv[])
} }
rc = asprintf(&rcfile, "%s/%s/config", lxcpath, my_args.name); rc = asprintf(&rcfile, "%s/%s/config", lxcpath, my_args.name);
INFO("using rcfile %s", rcfile);
free(lxcpath); free(lxcpath);
if (rc == -1) { if (rc == -1) {
SYSERROR("failed to allocate memory"); SYSERROR("failed to allocate memory");
return err; return err;
} }
INFO("using rcfile %s", rcfile);
/* container configuration does not exist */ /* container configuration does not exist */
if (access(rcfile, F_OK)) { if (access(rcfile, F_OK)) {
......
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