Re: [PATCH 3/6] qemu_driver: use VIR_AUTOUNREF() with virQEMUDriverConfigPtr 3/3

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

 





On 9/26/19 6:18 AM, Erik Skultety wrote:
On Wed, Sep 18, 2019 at 11:56:55AM -0300, Daniel Henrique Barboza wrote:
virQEMUDriverConfigPtr can be auto-unref for the great majority
of the uses made in qemu_driver, sparing us a virObjectUnref()
call and sometimes a whole 'cleanup' label.

This patch changes virQEMUDriverConfigPtr declarations to
use VIR_AUTOUNREF(). 'cleanup' labels were deleted when
applicable.

This is the last part of this change. All but one* instance of
virQEMUDriverConfigPtr were changed to use VIR_AUTOUNREF().
'cleanup' labels were deleted when applicable.

* qemuStateInitialize: we can't auto-unref the pointer since we're
initializing the qemu_driver object with it.

Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
---
I know you focused on virQEMUDriverConfigPtr primarily, but since you're
following up with VIR_AUTOFREE and touching qemu_driver only, I'd like to do a
better job and use VIR_AUTOUNREF at many more places across the file for:

virCapsPtr caps
virConnectPtr conn
qemuDomainSaveCookiePtr cookie
virQEMUCapsPtr qemuCaps
qemuBlockJobDataPtr job
virDomainCapsPtr domCaps
virNetworkPtr network

No problem. Should I squash the first 3 patches of this series into a single
one that will touch only virQEMUDriverConfigPtr and then make one patch
for each pointer type that's changed?


Thanks,


DHB




(there may be a few more...)

Erik

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

  Powered by Linux