aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine/camel-sasl-xoauth2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libemail-engine/camel-sasl-xoauth2.c')
-rw-r--r--libemail-engine/camel-sasl-xoauth2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libemail-engine/camel-sasl-xoauth2.c b/libemail-engine/camel-sasl-xoauth2.c
index 3cf43e7393..32aad56bfb 100644
--- a/libemail-engine/camel-sasl-xoauth2.c
+++ b/libemail-engine/camel-sasl-xoauth2.c
@@ -80,7 +80,7 @@ sasl_xoauth2_challenge_sync (CamelSasl *sasl,
gboolean success;
service = camel_sasl_get_service (sasl);
- session = camel_service_get_session (service);
+ session = camel_service_ref_session (service);
settings = camel_service_ref_settings (service);
uid = camel_service_get_uid (service);
@@ -108,6 +108,7 @@ sasl_xoauth2_challenge_sync (CamelSasl *sasl,
g_object_unref (source);
g_object_unref (settings);
+ g_object_unref (session);
/* IMAP and SMTP services will Base64-encode the request. */