Re: [PATCH 3/3] libxl: Resolve Coverity warnings

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

 



John Ferlan wrote:
> Resolve two Coverity issues introduced by commit id '9b8d6e1e'
>
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/libxl/libxl_migration.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c
> index 9fe904e..a25edf0 100644
> --- a/src/libxl/libxl_migration.c
> +++ b/src/libxl/libxl_migration.c
> @@ -98,8 +98,7 @@ libxlDoMigrateReceive(virNetSocketPtr sock,
>      size_t i;
>      int ret;
>  
> -    virNetSocketAccept(sock, &client_sock);
> -    if (client_sock == NULL) {
> +    if (virNetSocketAccept(sock, &client_sock) < 0) {
>          virReportError(VIR_ERR_OPERATION_INVALID, "%s",
>                         _("Fail to accept migration connection"));
>          goto cleanup;
> @@ -526,8 +525,7 @@ libxlDomainMigrationFinish(virConnectPtr dconn,
>   cleanup:
>      if (event)
>          libxlDomainEventQueue(driver, event);
> -    if (vm)
> -        virObjectUnlock(vm);
> +    virObjectUnlock(vm);
>      virObjectUnref(cfg);
>      return dom;
>  }
>   

ACK.

Regards,
Jim

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




[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]