summaryrefslogtreecommitdiff
path: root/plugins/dundee.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2012-08-17 09:47:07 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-08-17 13:01:56 +0300
commit01bae4fdcd7e3cdd37d311156f4d20854aa79be0 (patch)
treea52a0b7039c26f3b12ca9b4775a5405edb2b94c7 /plugins/dundee.c
parenta669c2da5024befaa2db4d7213209355bdd5307a (diff)
downloadconnman-01bae4fdcd7e3cdd37d311156f4d20854aa79be0.tar.gz
connman-01bae4fdcd7e3cdd37d311156f4d20854aa79be0.tar.bz2
connman-01bae4fdcd7e3cdd37d311156f4d20854aa79be0.zip
dundee: Fix error code handling in add_device()
If no error happens then we should just return and not run into the cleanup code. And when we cleanup we should not double free pointers.
Diffstat (limited to 'plugins/dundee.c')
-rw-r--r--plugins/dundee.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/dundee.c b/plugins/dundee.c
index ed611dd1..0a48db1a 100644
--- a/plugins/dundee.c
+++ b/plugins/dundee.c
@@ -632,12 +632,10 @@ static void add_device(const char *path, DBusMessageIter *properties)
if (info->active == TRUE)
set_connected(info);
+ return;
+
out:
g_hash_table_remove(dundee_devices, path);
-
- g_free(info->path);
- g_free(info->name);
- g_free(info);
}
static gboolean device_added(DBusConnection *conn, DBusMessage *message,