From: Dwight Engen Date: Tue, 12 Feb 2013 17:52:25 +0000 (-0500) Subject: only INFO rcfile if asprintf successfully allocates it X-Git-Tag: lxc-0.9.0.rc1~2^2~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=444f3ca2326cbf10bacc62ef0ad731e2e819c7b5;p=thirdparty%2Flxc.git only INFO rcfile if asprintf successfully allocates it Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/lxc_start.c b/src/lxc/lxc_start.c index aac7fe781..9d8db63c5 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)) {