From 4c5ef5ad054a4b45f448fc83f73654c316b277dd Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Wed, 21 Jul 2010 20:46:50 +0200 Subject: [PATCH] Check for NULL service pointer in nameserver host route routines VPNs will have a NULL service. --- src/service.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/service.c b/src/service.c index dceba3d..d130958 100644 --- a/src/service.c +++ b/src/service.c @@ -375,6 +375,9 @@ void __connman_service_nameserver_add_routes(struct connman_service *service, { int index; + if (service == NULL) + return; + index = connman_network_get_index(service->network); if (service->nameservers != NULL) { @@ -407,6 +410,9 @@ void __connman_service_nameserver_del_routes(struct connman_service *service) { int index; + if (service == NULL) + return; + index = connman_network_get_index(service->network); if (service->nameservers != NULL) { -- 2.7.4