提交 6940109b 编写于 作者: C Chris Lalancette

Remove a completely bogus reference increment in the Xen driver.

xenUnifiedDomainEventRegister() calls out to
virDomainEventCallbackListAdd(), which increments the reference
count on the connection.  That is fine, but then
xenUnifiedDomainEventRegister() increments the usage count again,
leading to a usage count leak.  Remove the increment in the xen
register, and the UnrefConnect in the xen unregister.
Signed-off-by: NChris Lalancette <clalance@redhat.com>
上级 43a9249c
......@@ -1502,9 +1502,6 @@ xenUnifiedDomainEventRegister (virConnectPtr conn,
ret = virDomainEventCallbackListAdd(conn, priv->domainEventCallbacks,
callback, opaque, freefunc);
if (ret == 0)
conn->refs++;
xenUnifiedUnlock(priv);
return (ret);
}
......@@ -1530,9 +1527,6 @@ xenUnifiedDomainEventDeregister (virConnectPtr conn,
ret = virDomainEventCallbackListRemove(conn, priv->domainEventCallbacks,
callback);
if (ret == 0)
virUnrefConnect(conn);
xenUnifiedUnlock(priv);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册