> On 10 Dec 2020, at 23:09, Elliott Mitchell <ehem+...@m5p.com> wrote:
> 
> There is potential for the info and info_free variable's purposes to
> diverge.  If info was overwritten with a distinct value, yet info_free
> still needed deallocation a bug would occur on this line.  Preemptively
> address this issue (making use of divergent info/info_free values is
> under consideration).
> 

Looks ok to me
Reviewed-by: Luca Fancellu <luca.fance...@arm.com>

> Signed-off-by: Elliott Mitchell <ehem+...@m5p.com>
> ---
> tools/xl/xl_info.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/xl/xl_info.c b/tools/xl/xl_info.c
> index 3647468420..938f06f1a8 100644
> --- a/tools/xl/xl_info.c
> +++ b/tools/xl/xl_info.c
> @@ -579,7 +579,7 @@ int main_list(int argc, char **argv)
>                      info, nb_domain);
> 
>     if (info_free)
> -        libxl_dominfo_list_free(info, nb_domain);
> +        libxl_dominfo_list_free(info_free, nb_domain);
> 
>     libxl_dominfo_dispose(&info_buf);
> 
> -- 
> 2.30.2
> 
> 


Reply via email to