Re: [PATCH] src: fix resource leak introduced in d4439a6b8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 07, 2021 at 04:53:34PM +0300, Nikolay Shirokovskiy wrote:
> @tmp that was copied just above is leaked on plain return.
> The issue is found by Coverity.
> 
> Patch that inroduced a leak:
> d4439a6b8 : src: adopt to VIR_DRV_SUPPORTS_FEATURE return -1
> 
> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
> ---
>  src/libvirt-domain.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
> index 2f9081a..c9f8ffd 100644
> --- a/src/libvirt-domain.c
> +++ b/src/libvirt-domain.c
> @@ -3022,7 +3022,7 @@ virDomainMigrateVersion3Full(virDomainPtr domain,
>      ret = VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
>                                     VIR_DRV_FEATURE_MIGRATE_CHANGE_PROTECTION);
>      if (ret < 0)
> -        return NULL;
> +        goto done;
>      if (ret)
>          protection = VIR_MIGRATE_CHANGE_PROTECTION;

Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux