From 233b185bf1a8b7e9946aff88971fcecadf639dc7 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Thu, 7 Mar 2013 18:13:38 +0200 Subject: [PATCH] vpn: Clear the data pointer from provider when destroying If the data pointer is left around, then vpn plugin might accidentally use it if dbus messages are received after we have cleared the vpn connection. --- plugins/vpn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/vpn.c b/plugins/vpn.c index cbba3965..f60a658b 100644 --- a/plugins/vpn.c +++ b/plugins/vpn.c @@ -1438,6 +1438,8 @@ static void destroy_provider(struct connection_data *data) if (data->call != NULL) dbus_pending_call_cancel(data->call); + connman_provider_set_data(data->provider, NULL); + connman_provider_put(data->provider); data->provider = NULL; -- 2.34.1