aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/imap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libsylph/imap.c b/libsylph/imap.c
index cdb898b7..b7b7e55d 100644
--- a/libsylph/imap.c
+++ b/libsylph/imap.c
@@ -751,6 +751,12 @@ static gint imap_session_reconnect(IMAPSession *session)
static void imap_session_destroy(Session *session)
{
+#if USE_THREADS
+ IMAPRealSession *real = (IMAPRealSession *)session;
+
+ if (real->pool)
+ g_thread_pool_free(real->pool, TRUE, TRUE);
+#endif
imap_capability_free(IMAP_SESSION(session));
g_free(IMAP_SESSION(session)->mbox);
session_list = g_list_remove(session_list, session);