All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>, xen-devel@lists.xen.org
Subject: Re: [PATCH v2 for-4.5 2/2] xl: fix two memory leaks
Date: Tue, 2 Dec 2014 14:19:49 +0000	[thread overview]
Message-ID: <1417529989.24320.48.camel@citrix.com> (raw)
In-Reply-To: <1417433473-17272-3-git-send-email-wei.liu2@citrix.com>

On Mon, 2014-12-01 at 11:31 +0000, Wei Liu wrote:
> Free strings returned by libxl_basename after used.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> ---
>  tools/libxl/xl_cmdimpl.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 0e754e7..fe3034f 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -920,6 +920,7 @@ static void parse_config_data(const char *config_source,
>      int pci_permissive = 0;
>      int pci_seize = 0;
>      int i, e;
> +    char *basename;

For some reason on arm32 (only) this causes:
xl_cmdimpl.c: In function ‘parse_config_data’:
xl_cmdimpl.c:929:11: error: declaration of ‘basename’ shadows a global declaration [-Werror=shadow]

basename(3) is defined by libgen.h which we don't include, so I suspect
this is a libc issue on armhf (unless Ian has any other ideas?).

How about I s/basename/kernel_basename/ or some such on commit?

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-12-02 14:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01 11:31 [PATCH v2 for-4.5 0/2] xl/libxl: fix API and two memory leaks Wei Liu
2014-12-01 11:31 ` [PATCH v2 for-4.5 1/2] libxl: un-constify return value of libxl_basename Wei Liu
2014-12-02 18:44   ` Andrew Cooper
2014-12-03  9:51     ` Ian Campbell
2014-12-01 11:31 ` [PATCH v2 for-4.5 2/2] xl: fix two memory leaks Wei Liu
2014-12-02 14:19   ` Ian Campbell [this message]
2014-12-02 14:23     ` Wei Liu
2014-12-01 11:40 ` [PATCH v2 for-4.5 0/2] xl/libxl: fix API and " Ian Campbell
2014-12-01 11:50   ` Wei Liu
2014-12-01 11:51     ` Ian Campbell
2014-12-01 21:54 ` Konrad Rzeszutek Wilk
2014-12-02 15:35   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417529989.24320.48.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.