diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index 1b7fd86b3ab11b9f02fc255e9170fc2ddbc0534d..0d5e999ef4a9c66f5c3a1e0454f46ae95dd13703 100644 --- a/src/locking/lock_daemon.c +++ b/src/locking/lock_daemon.c @@ -278,6 +278,7 @@ virLockDaemonNewPostExecRestart(virJSONValuePtr object, bool privileged) virLockDaemonClientFree, (void*)(intptr_t)(privileged ? 0x1 : 0x0)))) goto error; + virObjectUnref(srv); return lockd; diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c index e3b9390af2e45d44cac22e7c6b4924fdd72ff621..8c2141489710b16a114937bf8ec74d52de8c7a94 100644 --- a/src/rpc/virnetdaemon.c +++ b/src/rpc/virnetdaemon.c @@ -312,6 +312,7 @@ virNetDaemonAddServerPostExec(virNetDaemonPtr dmn, if (virHashAddEntry(dmn->servers, serverName, srv) < 0) goto error; + virObjectRef(srv); virJSONValueFree(object); virObjectUnlock(dmn);