From: Daniel Wagner <[email protected]>
During shutdown, e.g. ctrl-c was issued by the user, pugins are
removed first. The policy plugin will destroy the associated policy
config, therefore there is no need to do it later.
Accessing the session->policy NULL pointer later is not a good idea
anyway.
---
src/session.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/session.c b/src/session.c
index fe1f503..f31613a 100644
--- a/src/session.c
+++ b/src/session.c
@@ -251,6 +251,9 @@ static int create_policy_config(struct connman_session
*session)
static void destroy_policy_config(struct connman_session *session)
{
+ if (session->policy == NULL)
+ return;
+
(*session->policy->destroy)(session);
}
--
1.7.12.1.382.gb0576a6
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman