We should check for active_gateway being non NULL before dereferencing it.
Signed-off-by: Samuel Ortiz <[email protected]> --- src/connection.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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); } -- 1.6.3.1 -- Intel Open Source Technology Centre http://oss.intel.com/ _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
