diff options
author | Martin Xu <martin.xu@intel.com> | 2011-02-22 14:23:26 +0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-02-22 00:19:33 -0800 |
commit | c0b5b4849f8c8126c31bc585d6a8d596b421aec8 (patch) | |
tree | 6a9c8a751f7b3248cdd85da04578303a0492d0c8 /src/connection.c | |
parent | 00cdcda794b6fea0754ec2653865476c698ce089 (diff) | |
download | connman-c0b5b4849f8c8126c31bc585d6a8d596b421aec8.tar.gz connman-c0b5b4849f8c8126c31bc585d6a8d596b421aec8.tar.bz2 connman-c0b5b4849f8c8126c31bc585d6a8d596b421aec8.zip |
connection: Check gateway_hash value before call update_order()
When exit from ConnMan, __connman_connection_cleanup() is called
before __connman_service_cleanup() which then calls update_order().
__connman_connection_cleanup() sets gateway_hash as NULL, so update_order()
will access NULL hash and causes GLib-CRITICAL abort
Diffstat (limited to 'src/connection.c')
-rw-r--r-- | src/connection.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/connection.c b/src/connection.c index 6b2dd2b0..793bc8f5 100644 --- a/src/connection.c +++ b/src/connection.c @@ -385,6 +385,9 @@ gboolean __connman_connection_update_gateway(void) struct gateway_data *active_gateway, *default_gateway; gboolean updated = FALSE; + if (gateway_hash == NULL) + return updated; + update_order(); active_gateway = find_active_gateway(); |