dovecot-2.2: fts-lucene: Fix to previous change. We allocated wa...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Apr 15 22:14:01 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/5e42a8c18b51
changeset: 17224:5e42a8c18b51
user: Timo Sirainen <tss at iki.fi>
date: Wed Apr 16 00:13:42 2014 +0200
description:
fts-lucene: Fix to previous change. We allocated way too little memory.
diffstat:
src/plugins/fts-lucene/lucene-wrapper.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (15 lines):
diff -r c2755572d31e -r 5e42a8c18b51 src/plugins/fts-lucene/lucene-wrapper.cc
--- a/src/plugins/fts-lucene/lucene-wrapper.cc Wed Apr 16 00:04:29 2014 +0200
+++ b/src/plugins/fts-lucene/lucene-wrapper.cc Wed Apr 16 00:13:42 2014 +0200
@@ -537,9 +537,9 @@
datasize = uni_utf8_strlen_n(data, size) + 1;
wchar_t *dest, *dest_free = NULL;
if (datasize < 4096)
- dest = (wchar_t *)t_malloc(datasize);
+ dest = t_new(wchar_t, datasize);
else
- dest = dest_free = (wchar_t *)i_malloc(datasize);
+ dest = dest_free = i_new(wchar_t, datasize);
lucene_utf8_n_to_tchar(data, size, dest, datasize);
lucene_data_translate(index, dest, datasize);
More information about the dovecot-cvs
mailing list