diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2012-01-19 16:31:44 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-20 02:10:19 +0100 |
commit | 3a0da17f08d6f6d29eef055ac1dda8cd498bc866 (patch) | |
tree | 3a872e529ee214e7d94e855636dc3857cb3e3ce6 | |
parent | 97a7c37ca8dfc36dba16a0258f09e9d90d6e55d1 (diff) | |
download | connman-3a0da17f08d6f6d29eef055ac1dda8cd498bc866.tar.gz connman-3a0da17f08d6f6d29eef055ac1dda8cd498bc866.tar.bz2 connman-3a0da17f08d6f6d29eef055ac1dda8cd498bc866.zip |
provider: Remove provider from the hash properly
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.
-rw-r--r-- | src/provider.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/provider.c b/src/provider.c index 0bac230e..f0a91e87 100644 --- a/src/provider.c +++ b/src/provider.c @@ -668,7 +668,7 @@ failed: unref: DBG("can not connect, delete provider"); - connman_provider_unref(provider); + g_hash_table_remove(provider_hash, provider->identifier); return err; } |