Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6141:783d614b0db4 HEAD
Don't use a memory pool, it's overkill here.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 24 Jul 2007 06:49:00 +0300 |
parents | 291135c986b3 |
children | 6c0bfc35af03 |
files | src/lib-storage/list/subscription-file.c |
diffstat | 1 files changed, 7 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/list/subscription-file.c Mon Jul 23 08:10:59 2007 +0300 +++ b/src/lib-storage/list/subscription-file.c Tue Jul 24 06:49:00 2007 +0300 @@ -16,11 +16,9 @@ #define SUBSCRIPTION_FILE_CHANGE_TIMEOUT 30 struct subsfile_list_context { - pool_t pool; - struct mailbox_list *list; struct istream *input; - const char *path; + char *path; bool failed; }; @@ -176,14 +174,9 @@ subsfile_list_init(struct mailbox_list *list, const char *path) { struct subsfile_list_context *ctx; - pool_t pool; int fd; - pool = pool_alloconly_create("subsfile_list", - list->mailbox_name_max_length + 1024); - - ctx = p_new(pool, struct subsfile_list_context, 1); - ctx->pool = pool; + ctx = i_new(struct subsfile_list_context, 1); ctx->list = list; fd = nfs_safe_open(path, O_RDONLY); @@ -194,11 +187,11 @@ } } else { ctx->input = - i_stream_create_file(fd, pool, + i_stream_create_file(fd, default_pool, list->mailbox_name_max_length+1, TRUE); } - ctx->path = p_strdup(pool, path); + ctx->path = i_strdup(path); return ctx; } @@ -208,7 +201,8 @@ if (ctx->input != NULL) i_stream_destroy(&ctx->input); - pool_unref(ctx->pool); + i_free(ctx->path); + i_free(ctx); return ret; } @@ -247,7 +241,7 @@ return NULL; } - ctx->input = i_stream_create_file(fd, ctx->pool, + ctx->input = i_stream_create_file(fd, default_pool, ctx->list->mailbox_name_max_length+1, TRUE); }