[libvirt] [PATCH] remote: fix a memory free error

Daniel Henrique Barboza danielhb413 at gmail.com
Thu Sep 19 12:07:30 UTC 2019



On 9/19/19 5:00 AM, Xu Yandong wrote:
> In function remoteDeserializeDomainDiskErrors, there is a typo.
>
> Signed-off-by: Xu Yandong <xuyandong2 at huawei.com>
> ---

Reviewed-by: Daniel Henrique Barboza <danielhb413 at gmail.com>

>   src/remote/remote_driver.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
> index 8789c5da00..877250d40c 100644
> --- a/src/remote/remote_driver.c
> +++ b/src/remote/remote_driver.c
> @@ -1943,7 +1943,7 @@ remoteDeserializeDomainDiskErrors(remote_domain_disk_error *ret_errors_val,
>   
>    error:
>       for (j = 0; j < i; j++)
> -        VIR_FREE(errors[i].disk);
> +        VIR_FREE(errors[j].disk);
>   
>       return -1;
>   }




More information about the libvir-list mailing list