Re: [PATCH] qemu: unlock qemu driver before return

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

 



On Wed, Mar 30, 2011 at 09:49:29AM +0800, Hu Tao wrote:
> ---
>  src/qemu/qemu_driver.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 104e92d..6e3edde 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -2068,12 +2068,14 @@ static int qemudDomainSave(virDomainPtr dom, const char *path)
>              qemuReportError(VIR_ERR_OPERATION_FAILED,
>                              "%s", _("Invalid save image format specified "
>                                      "in configuration file"));
> +            qemuDriverUnlock(driver);
>              return -1;
>          }
>          if (!qemudCompressProgramAvailable(compressed)) {
>              qemuReportError(VIR_ERR_OPERATION_FAILED,
>                              "%s", _("Compression program for image format "
>                                      "in configuration file isn't available"));
> +            qemuDriverUnlock(driver);
>              return -1;
>          }
>      }

  Whoops ! A severe problem !
Though I think the best way to do this is to "goto cleanup" instead of
returning directly

  I just pushed the patch, thanks a lot !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

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