]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fts: Crashfix.
authorTimo Sirainen <tss@iki.fi>
Wed, 3 Aug 2011 15:54:19 +0000 (18:54 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 3 Aug 2011 15:54:19 +0000 (18:54 +0300)
src/plugins/fts/fts-parser-script.c

index 317c6d65f971f6d11b2be9ee69a9399e87cc1590..4cf4552edadecddb2f9760de32dda95e84416b84 100644 (file)
@@ -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) {