summaryrefslogtreecommitdiff
path: root/gsupplicant
diff options
context:
space:
mode:
authorEduardo Abinader <eduardo.abinader@openbossa.org>2014-09-17 12:27:25 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2014-09-18 12:13:00 (GMT)
commitc7d0593c7e8961217dc6d5fd121c683344f48d04 (patch)
tree98772a6850551f23a6fbb62cf0c5b55043e05703 /gsupplicant
parent9a5a48d0f718b209de49864bcb751ceae25e2fa5 (diff)
downloadconnman-c7d0593c7e8961217dc6d5fd121c683344f48d04.tar.gz
connman-c7d0593c7e8961217dc6d5fd121c683344f48d04.tar.xz
gsupplicant: Check interface on interface_has_p2p
Solves a segmentation fault occuring on peer service registration, when a wifi plugin did not have an associated interface while looping in peer service registration.
Diffstat (limited to 'gsupplicant')
-rw-r--r--gsupplicant/supplicant.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index fd16caf..b5e3930 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -3181,6 +3181,9 @@ int g_supplicant_interface_set_country(GSupplicantInterface *interface,
bool g_supplicant_interface_has_p2p(GSupplicantInterface *interface)
{
+ if (!interface)
+ return false;
+
return interface->p2p_support;
}