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

Xu Yandong posted 1 patch 4 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1568880056-87878-1-git-send-email-xuyandong2@huawei.com
Test syntax-check passed
src/remote/remote_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] remote: fix a memory free error
Posted by Xu Yandong 4 years, 7 months ago
In function remoteDeserializeDomainDiskErrors, there is a typo.

Signed-off-by: Xu Yandong <xuyandong2@huawei.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;
 }
-- 
2.18.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] remote: fix a memory free error
Posted by Daniel Henrique Barboza 4 years, 7 months ago

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

Reviewed-by: Daniel Henrique Barboza <danielhb413@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;
>   }

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] remote: fix a memory free error
Posted by Ján Tomko 4 years, 7 months ago
On Thu, Sep 19, 2019 at 04:00:56AM -0400, Xu Yandong wrote:
>In function remoteDeserializeDomainDiskErrors, there is a typo.
>
>Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
>---
> src/remote/remote_driver.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

and pushed

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list