Mercurial > dovecot > core-2.2
changeset 4045:5819e0190400 HEAD
Memory leak fixes
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 23 Feb 2006 20:25:44 +0200 |
parents | da1d65e064f8 |
children | 29afb0f7665f |
files | src/lib-index/mail-index-sync.c src/lib-index/mail-index-view-sync.c src/lib-storage/index/index-search.c |
diffstat | 3 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-sync.c Wed Feb 22 18:02:20 2006 +0200 +++ b/src/lib-index/mail-index-sync.c Thu Feb 23 20:25:44 2006 +0200 @@ -630,6 +630,7 @@ mail_index_view_close(&ctx->view); mail_index_transaction_rollback(&ctx->trans); + array_free(&ctx->sync_list); i_free(ctx); }
--- a/src/lib-index/mail-index-view-sync.c Wed Feb 22 18:02:20 2006 +0200 +++ b/src/lib-index/mail-index-view-sync.c Thu Feb 23 20:25:44 2006 +0200 @@ -530,8 +530,7 @@ i_assert(view->syncing); *_ctx = NULL; - if (ctx->sync_map_update) - mail_index_sync_map_deinit(&ctx->sync_map_ctx); + mail_index_sync_map_deinit(&ctx->sync_map_ctx); mail_index_view_sync_clean_log_syncs(ctx); if (!ctx->last_read && ctx->hdr != NULL &&
--- a/src/lib-storage/index/index-search.c Wed Feb 22 18:02:20 2006 +0200 +++ b/src/lib-storage/index/index-search.c Thu Feb 23 20:25:44 2006 +0200 @@ -507,6 +507,7 @@ input = mail_get_stream(ctx->mail, NULL, NULL); if (input == NULL) return FALSE; + i_stream_ref(input); } else { /* FIXME: do this once in init */ i_assert(*headers != NULL); @@ -538,6 +539,7 @@ if (input == NULL) return FALSE; + i_stream_ref(input); i_stream_seek(input, hdr_size.physical_size); } @@ -551,6 +553,7 @@ mail_search_args_foreach(args, search_body, &body_ctx); } + i_stream_unref(&input); return TRUE; }