Re: [PATCH v2 3/9] locking: Remove redundant 'srv' element from virLockDaemon

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

 



On Fri, Aug 21, 2015 at 08:04:04PM +0200, Erik Skultety wrote:
Now that we have virNetDaemon object holding all the data and being
capable of referencing multiple servers, having a duplicate reference to
a single server stored in virLockDaemon isn't necessary anymore. This
patch removes the above described element.
---
src/locking/lock_daemon.c | 40 +++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index c035024..ae3a507 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -1353,14 +1354,15 @@ int main(int argc, char **argv) {
            goto cleanup;
        }

-        if ((rv = virLockDaemonSetupNetworkingSystemD(lockDaemon->srv)) < 0) {
+        srv = virNetDaemonGetServer(lockDaemon->dmn, 0);

This increases the refcount, you need to match it with virObjectUnref(srv);

ACK with this squashed in:

diff --git i/src/locking/lock_daemon.c w/src/locking/lock_daemon.c
index 94f9b11a4829..a50828f56e48 100644
--- i/src/locking/lock_daemon.c
+++ w/src/locking/lock_daemon.c
@@ -1424,6 +1424,7 @@ int main(int argc, char **argv) {
        ret = 0;

 cleanup:
+    virObjectUnref(srv);
    virObjectUnref(lockProgram);
    virLockDaemonFree(lockDaemon);
    if (statuswrite != -1) {
--

Attachment: signature.asc
Description: PGP signature

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