On Fri, Sep 01, 2017 at 02:59:23PM +0800, Yi Sun wrote:
> @@ -410,8 +410,10 @@ int libxl_psr_cat_get_l3_info(libxl_ctx *ctx, 
> libxl_psr_cat_info **info,
>                                int *nr)
>  {
>      int rc;
> +    unsigned int num;
>  
> -    rc = libxl_psr_cat_get_info(ctx, info, nr, 3);
> +    rc = libxl_psr_cat_get_info(ctx, info, &num, 3);

In order to avoid leaking stack data, I would rather do:

if (!rc)
    *nr = num;

The rest LGTM.

Thanks, Roger.

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

Reply via email to