diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2011-08-24 17:02:05 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-09-12 11:40:47 +0200 |
commit | 2023d1633ea0cb6bd3075d302d9071f55d0ea793 (patch) | |
tree | a18b5c114c0a2d2d2aceff0737d24d89627e38d5 /src/connection.c | |
parent | 6f2a6fd378b22c88a3de22ae2f3e6d6792319243 (diff) | |
download | connman-2023d1633ea0cb6bd3075d302d9071f55d0ea793.tar.gz connman-2023d1633ea0cb6bd3075d302d9071f55d0ea793.tar.bz2 connman-2023d1633ea0cb6bd3075d302d9071f55d0ea793.zip |
connection: Service was not ref counted properly
The reference counting problems were clearly seen with VPN service.
Diffstat (limited to 'src/connection.c')
-rw-r--r-- | src/connection.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/connection.c b/src/connection.c index d8d95f32..477cf842 100644 --- a/src/connection.c +++ b/src/connection.c @@ -229,6 +229,7 @@ static struct gateway_data *add_gateway(struct connman_service *service, } } + connman_service_ref(service); g_hash_table_replace(gateway_hash, service, data); return data; @@ -720,9 +721,10 @@ void __connman_connection_gateway_remove(struct connman_service *service, && do_ipv4 == TRUE) || (data->ipv6_gateway != NULL && data->ipv4_gateway == NULL && do_ipv6 == TRUE) - ) + ) { + connman_service_unref(service); g_hash_table_remove(gateway_hash, service); - else + } else DBG("Not yet removing gw ipv4 %p/%d ipv6 %p/%d", data->ipv4_gateway, do_ipv4, data->ipv6_gateway, do_ipv6); |