diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-12-05 14:57:44 +0100 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-12-05 16:50:28 +0200 |
commit | 7b585110761c459da49b7b8ef9b18c502465dbf4 (patch) | |
tree | 9f4217c824f498d7f75ee1025c906fc057e98e23 /src/session.c | |
parent | 635c64efa9425970354a56d9e63fbb73f525da2b (diff) | |
download | connman-7b585110761c459da49b7b8ef9b18c502465dbf4.tar.gz connman-7b585110761c459da49b7b8ef9b18c502465dbf4.tar.bz2 connman-7b585110761c459da49b7b8ef9b18c502465dbf4.zip |
session: Remove notify watch
free_session() will be also called from the error path (e.g.
__connman_session_create()). In case we have added a watch
we need to disarm it.
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/session.c b/src/session.c index 4bf7cfd9..7370a07e 100644 --- a/src/session.c +++ b/src/session.c @@ -865,6 +865,9 @@ static void free_session(struct connman_session *session) if (session == NULL) return; + if (session->notify_watch > 0) + g_dbus_remove_watch(connection, session->notify_watch); + destroy_policy_config(session); g_slist_free(session->info->config.allowed_bearers); g_free(session->owner); |