]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Add data stack frame when dumping filters
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 22 Nov 2023 08:41:47 +0000 (10:41 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 22 Nov 2023 08:41:47 +0000 (10:41 +0200)
src/config/config-dump-full.c

index 64bb77be010b50df35999e5b42202fa027d557d7..6eadf0360a71bcbbf286129ba20ef4866171c7b0 100644 (file)
@@ -166,13 +166,14 @@ config_dump_full_write_filters(struct ostream *output,
 
        /* the first filter is the global empty filter */
        o_stream_nsend(output, "", 1);
-       string_t *str = t_str_new(128);
-       for (i = 1; i < filter_count; i++) {
+       string_t *str = str_new(default_pool, 128);
+       for (i = 1; i < filter_count; i++) T_BEGIN {
                str_truncate(str, 0);
                config_dump_full_append_filter(str, &filters[i]->filter);
                str_append_c(str, '\0');
                o_stream_nsend(output, str_data(str), str_len(str));
-       }
+       } T_END;
+       str_free(&str);
 }
 
 static void