From: Samuel Ortiz Date: Mon, 29 Jun 2009 19:17:39 +0000 (+0200) Subject: Check for active_gateway being non NULL before dereferencing it X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~3661 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7404d68b001a29e96fcf11727def2ac53e40d2df;p=profile%2Fivi%2Fconnman.git Check for active_gateway being non NULL before dereferencing it --- diff --git a/src/connection.c b/src/connection.c index d057d8a..b20a5a1 100644 --- a/src/connection.c +++ b/src/connection.c @@ -654,6 +654,6 @@ void __connman_connection_update_gateway(void) active_gateway = find_active_gateway(); default_gateway = find_default_gateway(); - if (active_gateway != default_gateway) + if (active_gateway && active_gateway != default_gateway) del_route(active_gateway->element, active_gateway->gateway); }