
On 21/08/15 23:45, Martin Kletzander wrote:
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) { -- Adjusted and pushed, thank you for review.
Erik