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@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list