[Libvirt-cim] [PATCH] ComputerSystem: getInstance with wrong hypervisor segfaults

Jay Gagnon grendel at linux.vnet.ibm.com
Thu Jan 24 14:01:51 UTC 2008


Heidi Eckhart wrote:
> # HG changeset patch
> # User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
> # Date 1201179188 -3600
> # Node ID 2a4ee3b11a8e2879597b6e312eaa8ccdd1e56aef
> # Parent  dc5a3cf2e717e2630958454211bc7e0e4b8b2e94
> ComputerSystem: getInstance with wrong hypervisor segfaults
>
> wbemgi 'http://localhost:5988/root/virt:Xen_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="qemu1"'
> on a KVM system seg faults.
> Signed-off-by: Heidi Eckhart <heidieck at linux.vnet.ibm.com>
>
> diff -r dc5a3cf2e717 -r 2a4ee3b11a8e src/Virt_ComputerSystem.c
> --- a/src/Virt_ComputerSystem.c	Thu Jan 24 13:28:14 2008 +0100
> +++ b/src/Virt_ComputerSystem.c	Thu Jan 24 13:53:08 2008 +0100
> @@ -394,8 +394,12 @@ CMPIStatus get_domain(const CMPIBroker *
>          }
>
>          conn = connect_by_classname(broker, CLASSNAME(reference), &s);
> -        if (conn == NULL)
> +        if (conn == NULL) {
> +                cu_statusf(broker, &s,
> +                           CMPI_RC_ERR_NOT_FOUND,
> +                           "No such instance.");
>                  return s;
> +        }
>
>          _inst = instance_from_name(broker, conn, name, reference);
>          if (_inst == NULL) {
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>   
Hmm, second patch in a row that I've looked at that was just like this. 
Do you know if this is a widespread issue or not?

-- 

-Jay




More information about the Libvirt-cim mailing list