summaryrefslogtreecommitdiff
path: root/vpn/vpn-provider.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2013-01-08 13:57:03 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-01-08 15:01:51 +0200
commit3a7ad9492e309484908136aef7e47dd337b20079 (patch)
treed00be5ecb88849d189fa4dfb00fb12ba43f295bf /vpn/vpn-provider.c
parentc13aad78bce6fb17f44519b798d14b836e8244b1 (diff)
downloadconnman-3a7ad9492e309484908136aef7e47dd337b20079.tar.gz
connman-3a7ad9492e309484908136aef7e47dd337b20079.tar.bz2
connman-3a7ad9492e309484908136aef7e47dd337b20079.zip
vpn-provider: Check if providers list is NULL before using it
Diffstat (limited to 'vpn/vpn-provider.c')
-rw-r--r--vpn/vpn-provider.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c
index 4c9fa159..56a9c511 100644
--- a/vpn/vpn-provider.c
+++ b/vpn/vpn-provider.c
@@ -1595,6 +1595,9 @@ static void provider_create_all_from_type(const char *provider_type)
providers = __connman_storage_get_providers();
+ if (providers == NULL)
+ return;
+
for (i = 0; providers[i] != NULL; i+=1) {
if (strncmp(providers[i], "provider_", 9) != 0)