[PATCH 2/3] technology: Fix a false positive null dereference

2014-05-12 Thread Tomasz Bursztyka
P2P technology cannot exist without wifi technology, so if P2P is
present, wifi is present as well. Thus what coverity thinks is a null
dereference is a false positive here.

Reported by Daniel Wagner 
---
 src/technology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/technology.c b/src/technology.c
index a917a6c..d80d9e6 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -708,7 +708,7 @@ static int technology_enable(struct connman_technology 
*technology)
struct connman_technology *wifi;
 
wifi = technology_find(CONNMAN_SERVICE_TYPE_WIFI);
-   if (wifi->enabled)
+   if (wifi && wifi->enabled)
return technology_enabled(technology);
return 0;
}
-- 
1.8.3.2

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


[PATCH 2/3] technology: Fix a false positive null dereference

2014-05-14 Thread Tomasz Bursztyka
P2P technology cannot exist without wifi technology, so if P2P is
present, wifi is present as well. Thus what coverity thinks is a null
dereference is a false positive here.

Reported by Daniel Wagner 
---
 src/technology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/technology.c b/src/technology.c
index a917a6c..d80d9e6 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -708,7 +708,7 @@ static int technology_enable(struct connman_technology 
*technology)
struct connman_technology *wifi;
 
wifi = technology_find(CONNMAN_SERVICE_TYPE_WIFI);
-   if (wifi->enabled)
+   if (wifi && wifi->enabled)
return technology_enabled(technology);
return 0;
}
-- 
1.8.3.2

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman