[evolution-data-server] Fix memory leak in imapx_continuation() with SASL auth
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Fix memory leak in imapx_continuation() with SASL auth
- Date: Thu, 1 Jul 2010 08:02:38 +0000 (UTC)
commit f686f27a89f65f6c199664af70c8aa69914600b2
Author: David Woodhouse <David Woodhouse intel com>
Date: Thu Jul 1 09:01:27 2010 +0100
Fix memory leak in imapx_continuation() with SASL auth
==4945== 1 bytes in 1 blocks are definitely lost in loss record 48 of 23,077
==4945== at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==4945== by 0x319A044AE2: g_malloc (gmem.c:132)
==4945== by 0x319A05C3BD: g_strdup (gstrfuncs.c:102)
==4945== by 0x6478E63: camel_sasl_challenge_base64 (camel-sasl.c:326)
==4945== by 0x12C54E72: imapx_continuation (camel-imapx-server.c:1698)
==4945== by 0x12C552CC: imapx_step (camel-imapx-server.c:1862)
camel/providers/imapx/camel-imapx-server.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 4d248a2..48de448 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1706,7 +1706,7 @@ imapx_continuation(CamelIMAPXServer *imap, CamelException *ex, gboolean litplus)
c(printf("got auth continuation, feeding token '%s' back to auth mech\n", resp));
camel_stream_write((CamelStream *)imap->stream, resp, strlen(resp));
-
+ g_free(resp);
/* we want to keep getting called until we get a status reponse from the server
ignore what sasl tells us */
newliteral = ic;
@@ -3806,8 +3806,10 @@ imapx_job_refresh_info_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
goto done;
/* If QRESYNC-capable we'll have got all flags changes in SELECT */
- if (can_qresync)
+ if (can_qresync) {
+ isum->modseq = ifolder->modseq_on_server;
goto done;
+ }
}
if (!need_rescan)
@@ -3816,6 +3818,7 @@ imapx_job_refresh_info_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
if (can_qresync) {
/* Actually we only want to select it; no need for the NOOP */
camel_imapx_server_noop(is, folder, ex);
+ isum->modseq = ifolder->modseq_on_server;
goto done;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]