Mercurial > dovecot > core-2.2
changeset 13127:5b7cc753f7c8
fts: Crashfix.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 03 Aug 2011 18:54:19 +0300 |
parents | 0a0f962c1a6f |
children | 62c8eadd09d2 |
files | src/plugins/fts/fts-parser-script.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/fts/fts-parser-script.c Fri Jul 29 14:30:32 2011 +0300 +++ b/src/plugins/fts/fts-parser-script.c Wed Aug 03 18:54:19 2011 +0300 @@ -114,15 +114,13 @@ const struct content *content; if (suser == NULL) { - suser = i_new(struct fts_parser_script_user, 1); + suser = p_new(user->pool, struct fts_parser_script_user, 1); p_array_init(&suser->content, user->pool, 32); MODULE_CONTEXT_SET(user, fts_parser_script_user_module, suser); } if (array_count(&suser->content) == 0) { - if (script_contents_read(user) < 0) { - array_free(&suser->content); + if (script_contents_read(user) < 0) return FALSE; - } } if (strcmp(*content_type, "application/octet-stream") == 0) {