[lxc-devel] [PATCH] only INFO rcfile if asprintf successfully allocates it
Serge Hallyn
serge.hallyn at ubuntu.com
Tue Feb 12 18:13:47 UTC 2013
Quoting Dwight Engen (dwight.engen at oracle.com):
> Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
Indeed. thanks :)
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.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
>
>
> ------------------------------------------------------------------------------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013
> and get the hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
More information about the lxc-devel
mailing list