aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 *