The dbus messages from vpnd might come in different order so make
sure we are not trying to access already removed provider.
---
 plugins/vpn.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/plugins/vpn.c b/plugins/vpn.c
index f15796d..04318a9 100644
--- a/plugins/vpn.c
+++ b/plugins/vpn.c
@@ -796,6 +796,14 @@ static int provider_remove(struct connman_provider 
*provider)
 
        DBG("provider %p data %p", provider, data);
 
+       if (data == NULL) {
+               /*
+                * This means the provider is already removed,
+                * just ignore the dbus in this case.
+                */
+               return -EALREADY;
+       }
+
        /*
         * When provider.c:provider_remove() calls this function,
         * it will remove the provider itself after the call.
-- 
1.7.11.4

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

Reply via email to