Re: [PATCH 1/2] Check wifi plugin exists before removing peer

2014-07-24 Thread Tomasz Bursztyka

Hi Eduardo,


@@ -2291,6 +2291,9 @@ static void peer_lost(GSupplicantPeer *peer)
struct connman_peer *connman_peer;
const char *identifier;
  
+	if (!wifi)

+   return;
+
identifier = g_supplicant_peer_get_identifier(peer);



Good catch!

ACK

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


[PATCH 1/2] Check wifi plugin exists before removing peer

2014-07-24 Thread Eduardo Abinader
Do sanity check before using wifi pointer on
peer_lost.
---
 plugins/wifi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index eb1fad0..ce6d7e7 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2291,6 +2291,9 @@ static void peer_lost(GSupplicantPeer *peer)
struct connman_peer *connman_peer;
const char *identifier;
 
+   if (!wifi)
+   return;
+
identifier = g_supplicant_peer_get_identifier(peer);
 
DBG(ident: %s, identifier);
-- 
1.9.1

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