projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0889675
)
Fix memory leak when plugin init fails
author
Marcel Holtmann
<marcel@holtmann.org>
Sat, 18 Oct 2008 16:06:18 +0000
(18:06 +0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Sat, 18 Oct 2008 16:06:18 +0000
(18:06 +0200)
src/plugin.c
patch
|
blob
|
history
diff --git
a/src/plugin.c
b/src/plugin.c
index
cfbd906
..
153b7be
100644
(file)
--- a/
src/plugin.c
+++ b/
src/plugin.c
@@
-47,8
+47,10
@@
static gboolean add_plugin(void *handle, struct connman_plugin_desc *desc)
plugin->handle = handle;
plugin->desc = desc;
- if (desc->init() < 0)
+ if (desc->init() < 0) {
+ g_free(plugin);
return FALSE;
+ }
plugins = g_slist_append(plugins, plugin);