On Mon, 2015-07-27 at 18:45 +0100, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.l...@citrix.com>
> ---
>  tools/libxl/libxlu_pci.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/libxl/libxlu_pci.c b/tools/libxl/libxlu_pci.c
> index 026413b..16ddaf7 100644
> --- a/tools/libxl/libxlu_pci.c
> +++ b/tools/libxl/libxlu_pci.c
> @@ -178,6 +178,7 @@ int xlu_pci_parse_bdf(XLU_Config *cfg, 
> libxl_device_pci *pcidev, const char *str
>      return 0;
>  
>  parse_error:
> +    free(buf2);

There is a path (half a dozen lines above) which can do free(buf2) followed
by goto parse_error. That free ought to set buf2=NULL, or the free needs to
move after that check on the success path.


>      return ERROR_INVAL;
>  }
>  
> @@ -254,6 +255,7 @@ int xlu_rdm_parse(XLU_Config *cfg, libxl_rdm_reserve 
> *rdm, const char *str)
>      return 0;
>  
>  parse_error:
> +    free(buf2);

Same here.

>      return ERROR_INVAL;
>  }
>  

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

Reply via email to