From: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
As documented at
https://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html#ga25...
the creator of a non-shared D-Bus connection has to release the last
reference after closing for freeing.
Signed-off-by: Marc Hartmayer <mhartmay(a)linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk(a)linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi(a)linux.ibm.com>
---
src/util/virdbus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util/virdbus.c b/src/util/virdbus.c
index d0e2c76e486f..1d1e39aae728 100644
--- a/src/util/virdbus.c
+++ b/src/util/virdbus.c
@@ -144,6 +144,7 @@ void virDBusCloseSystemBus(void)
{
if (systembus && !sharedBus) {
dbus_connection_close(systembus);
+ dbus_connection_unref(systembus);
systembus = NULL;
}
}
--
2.17.0