aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2008-12-29 19:49:26 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-12-29 19:49:26 +0800
commitfabdf4e38885ad280e5511bbe4a8ee6a25d2df60 (patch)
tree216f2695494d1002a5bebbb6932900d9c9e12c31 /mail
parent53f720559f88591612f0a76e18e01505d0ed2078 (diff)
downloadgsoc2013-evolution-fabdf4e38885ad280e5511bbe4a8ee6a25d2df60.tar.gz
gsoc2013-evolution-fabdf4e38885ad280e5511bbe4a8ee6a25d2df60.tar.zst
gsoc2013-evolution-fabdf4e38885ad280e5511bbe4a8ee6a25d2df60.zip
** Fixes bug #565857
2008-12-29 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #565857 * mail/e-searching-tokenizer.c (searcher_next_token): The HTMLTokenizer now expects a newly-allocated string from its next_token() method, so duplicate the returned string. This fixes a memory leak whereby previously, some implementations of next_token() did return a newly-allocated string, some did not. Those that did leaked those strings. svn path=/trunk/; revision=36945
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/e-searching-tokenizer.c2
2 files changed, 12 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 2050d53983..fe9ebb2b84 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2008-12-29 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes bug #565857
+
+ * e-searching-tokenizer.c (searcher_next_token):
+ The HTMLTokenizer now expects a newly-allocated string from its
+ next_token() method, so duplicate the returned string. This fixes
+ a memory leak whereby previously, some implementations of next_token()
+ did return a newly-allocated string, some did not. Those that did
+ leaked those strings.
+
2008-12-22 Sankar P <psankar@novell.com>
** Part of fix for bug #559153
diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c
index 88aca1eca8..172a126c92 100644
--- a/mail/e-searching-tokenizer.c
+++ b/mail/e-searching-tokenizer.c
@@ -811,7 +811,7 @@ searcher_next_token(struct _searcher *s)
s->current = token = (struct _token *)e_dlist_remhead(&s->output);
- return token?token->tok:NULL;
+ return token ? g_strdup (token->tok) : NULL;
}
static char *