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:
97a7c37
)
provider: Remove provider from the hash properly
author
Jukka Rissanen
<jukka.rissanen@linux.intel.com>
Thu, 19 Jan 2012 14:31:44 +0000
(16:31 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 20 Jan 2012 01:10:19 +0000
(
02:10
+0100)
We must not just do connman_provider_unref(provider) as that will
leave the provider to the provider_hash and we will get free memory
access error. We can just remove the provider from the hash and
that will unref the provider automagically.
src/provider.c
patch
|
blob
|
history
diff --git
a/src/provider.c
b/src/provider.c
index
0bac230
..
f0a91e8
100644
(file)
--- a/
src/provider.c
+++ b/
src/provider.c
@@
-668,7
+668,7
@@
failed:
unref:
DBG("can not connect, delete provider");
-
connman_provider_unref(provid
er);
+
g_hash_table_remove(provider_hash, provider->identifi
er);
return err;
}