[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 for-4.5 2/2] xl: fix two memory leaks



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@xxxxxxxxxx>
> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.