summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-09-06 01:10:56 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-09-06 01:10:56 +0200
commitc74f11481aabe51612c7200e1e3ab91f7f1c4abb (patch)
tree8ce09cbb3bd482becfe1057aec9a530126b6e0a7 /network
parent8b2e688eaf5b71006c72cf91a8e4df3c0c41c306 (diff)
Fix D-Bus connection init
Diffstat (limited to 'network')
-rw-r--r--network/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/network/main.c b/network/main.c
index 2307a165..b81c111b 100644
--- a/network/main.c
+++ b/network/main.c
@@ -32,11 +32,10 @@
#include "plugin.h"
#include "manager.h"
-static DBusConnection *connection = NULL;
+static DBusConnection *connection;
static int network_init(void)
{
-
connection = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
if (connection == NULL)
return -EIO;
@@ -52,6 +51,7 @@ static int network_init(void)
static void network_exit(void)
{
network_manager_exit();
+
dbus_connection_unref(connection);
}