Commit id '
252610f7d' used a hash table to store the @srv, but
didn't handle the virObjectUnref if virNetDaemonNew failed nor
did it use virObjectUnref once successfully placed into the table
which will now be managing it's lifetime (and would cause the
virObjectRef if successfully inserted into the table).
if (!(lockd->dmn = virNetDaemonNew()) ||
virNetDaemonAddServer(lockd->dmn, srv) < 0)
goto error;
+ virObjectUnref(srv);
+ srv = NULL;
if (!(lockd->lockspaces = virHashCreate(VIR_LOCK_DAEMON_NUM_LOCKSPACES,
virLockDaemonLockSpaceDataFree)))
return lockd;
error:
+ virObjectUnref(srv);
virLockDaemonFree(lockd);
return NULL;
}