Re: [PATCH] qemu: remove redundant virQEMUDriverGetConfig

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

 



On Tue, Mar 25, 2014 at 04:37:33PM -0400, Tomoki Sekiyama wrote:
> qemuDomainSetSchedulerParametersFlags() calls virQEMUDriverGetConfig() twice
> and makes the reference counter leak. This removes redundant call.
> ---
>  src/qemu/qemu_driver.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 76f789e..ca971f3 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -9050,7 +9050,6 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
>      if (virDomainSetSchedulerParametersFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
>          goto cleanup;
>  
> -    cfg = virQEMUDriverGetConfig(driver);
>      if (!cfg->privileged) {
>          virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
>                         _("CPU tuning is not available in session mode"));

IMHO should delete the other call to GetConfig. We should only take the
reference once we've checked the ACL


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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