]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
only INFO rcfile if asprintf successfully allocates it
authorDwight Engen <dwight.engen@oracle.com>
Tue, 12 Feb 2013 17:52:25 +0000 (12:52 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 18 Feb 2013 20:57:41 +0000 (15:57 -0500)
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc_start.c

index aac7fe781c22ddef067b4da802da0d1eff16c69c..9d8db63c5a84a92cfaefaca2350423271547a875 100644 (file)
@@ -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)) {