projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a669c2d
)
dundee: Fix error code handling in add_device()
author
Daniel Wagner
<daniel.wagner@bmw-carit.de>
Fri, 17 Aug 2012 07:47:07 +0000
(09:47 +0200)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Fri, 17 Aug 2012 10:01:56 +0000
(13:01 +0300)
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.
plugins/dundee.c
patch
|
blob
|
history
diff --git
a/plugins/dundee.c
b/plugins/dundee.c
index
ed611dd
..
0a48db1
100644
(file)
--- 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,