From 3ff57f96f3e8dac2b9ed4bed7421572b8baf7f4f Mon Sep 17 00:00:00 2001 From: Jakub Adam Date: Tue, 13 Dec 2016 14:40:18 +0100 Subject: [PATCH] session: fix chat session leak When user closed a chat, the removed sip session didn't free its associated chat session, which was then kept in chat_sessions list until sipe_chat_destroy() finally cleaned it up on plugin unload. Consequently, unconfirmed application sharing accept dialog was left open even after leaving the respective meeting and clicking Accept produced an error: 488 Not acceptable here Participant is not connected to conference --- src/core/sipe-session.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/sipe-session.c b/src/core/sipe-session.c index bdd73402..da1c05d0 100644 --- a/src/core/sipe-session.c +++ b/src/core/sipe-session.c @@ -3,7 +3,7 @@ * * pidgin-sipe * - * Copyright (C) 2009-2013 SIPE Project + * Copyright (C) 2009-2016 SIPE Project * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -207,6 +207,10 @@ sipe_session_remove(struct sipe_core_private *sipe_private, if (session->conf_unconfirmed_messages) g_hash_table_destroy(session->conf_unconfirmed_messages); + if (session->chat_session) { + sipe_chat_remove_session(session->chat_session); + } + g_free(session->with); g_free(session->callid); g_free(session->im_mcu_uri); -- 2.11.4.GIT