From: Martin Xu Date: Tue, 22 Feb 2011 06:23:26 +0000 (+0800) Subject: connection: Check gateway_hash value before call update_order() X-Git-Tag: 2.0_alpha~1704 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0b5b4849f8c8126c31bc585d6a8d596b421aec8;p=framework%2Fconnectivity%2Fconnman.git 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 --- diff --git a/src/connection.c b/src/connection.c index 6b2dd2b..793bc8f 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();