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

Re: [libvirt] [PATCH 27/27] Fix crash in device hotplug cleanup code



On Thu, 2009-09-24 at 16:00 +0100, Daniel P. Berrange wrote:
> * src/qemu/qemu_driver.c: Fix crash in scenario where XML
>   parsing of hotplugged device failed & thus 'dev' is NULL
> ---
>  src/qemu/qemu_driver.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index da72913..7dc9353 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -4880,7 +4880,7 @@ cleanup:
>      if (cgroup)
>          virCgroupFree(&cgroup);
>  
> -    if (ret < 0) {
> +    if (ret < 0 && dev != NULL) {
>          if (qemuDomainSetDeviceOwnership(dom->conn, driver, dev, 1) < 0)
>              VIR_WARN0("Fail to restore disk device ownership");
>          virDomainDeviceDefFree(dev);

Nice; there's a good few changes I'd have liked to have seen split out
and moved to the start of the series

ACK

Cheers,
Mark.



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