From 7404d68b001a29e96fcf11727def2ac53e40d2df Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Mon, 29 Jun 2009 21:17:39 +0200 Subject: [PATCH] Check for active_gateway being non NULL before dereferencing it --- src/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.7.4