From: Daniel Wagner <[email protected]>

If there is no match between the network object and all drivers
then driver will point to the last entry in the list which is
a random driver. So we need to check if we terminated the loop
because there was no match.
---
 src/network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/network.c b/src/network.c
index 57b1974..e60f12b 100644
--- a/src/network.c
+++ b/src/network.c
@@ -773,7 +773,7 @@ static int network_probe(struct connman_network *network)
                driver = NULL;
        }
 
-       if (driver == NULL)
+       if (list == NULL || driver == NULL)
                return -ENODEV;
 
        if (network->group == NULL)
-- 
1.8.0.rc0

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to