From: Patrik Flykt <[email protected]>

interface_get_result() callback is seen to be called with user_data
set to NULL. Check the condition to avoid a crash.
---
 gsupplicant/supplicant.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index e5743f0..ce8004f 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -2184,6 +2184,11 @@ static void interface_get_result(const char *error,
 
        SUPPLICANT_DBG("");
 
+       if (data == NULL) {
+               SUPPLICANT_DBG("NULL user data returned");
+               return;
+       }
+
        if (error != NULL) {
                SUPPLICANT_DBG("Interface not created yet");
                err = -EIO;
-- 
1.7.2.5

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

Reply via email to