From: Timo Sirainen Date: Wed, 3 Aug 2011 15:54:19 +0000 (+0300) Subject: fts: Crashfix. X-Git-Tag: 2.1.alpha1~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a34f47ba8dfd95f30b9a7677ccb9f6e329b15fda;p=thirdparty%2Fdovecot%2Fcore.git fts: Crashfix. --- diff --git a/src/plugins/fts/fts-parser-script.c b/src/plugins/fts/fts-parser-script.c index 317c6d65f9..4cf4552eda 100644 --- a/src/plugins/fts/fts-parser-script.c +++ b/src/plugins/fts/fts-parser-script.c @@ -114,15 +114,13 @@ static bool script_support_content(struct mail_user *user, 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) {