Mercurial > dovecot > core-2.2
changeset 12759:ea1c0e39f794
Avoid unnecessary data stack leaks.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 24 Feb 2011 11:26:27 +0200 |
parents | 99b340a4c747 |
children | 8e222035b6e9 |
files | src/imap/imap-sync.c src/lib-index/mail-index-transaction.c src/lib/process-title.c |
diffstat | 3 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/imap-sync.c Thu Feb 24 11:02:29 2011 +0200 +++ b/src/imap/imap-sync.c Thu Feb 24 11:26:27 2011 +0200 @@ -680,7 +680,7 @@ return ret; } -bool cmd_sync_delayed(struct client *client) +static bool cmd_sync_delayed_real(struct client *client) { struct client_command_context *cmd, *first_expunge, *first_nonexpunge; @@ -726,3 +726,13 @@ i_assert(client->mailbox != NULL); return cmd_sync_client(cmd); } + +bool cmd_sync_delayed(struct client *client) +{ + bool ret; + + T_BEGIN { + ret = cmd_sync_delayed_real(client); + } T_END; + return ret; +}
--- a/src/lib-index/mail-index-transaction.c Thu Feb 24 11:02:29 2011 +0200 +++ b/src/lib-index/mail-index-transaction.c Thu Feb 24 11:26:27 2011 +0200 @@ -132,10 +132,10 @@ if (mail_transaction_log_append_begin(log->index, external, &ctx) < 0) return -1; ret = mail_transaction_log_file_refresh(t, ctx); - if (ret > 0) { + if (ret > 0) T_BEGIN { mail_index_transaction_finish(t); mail_index_transaction_export(t, ctx); - } + } T_END; mail_transaction_log_get_head(log, &log_seq1, &log_offset1); if (mail_transaction_log_append_commit(&ctx) < 0 || ret < 0)
--- a/src/lib/process-title.c Thu Feb 24 11:02:29 2011 +0200 +++ b/src/lib/process-title.c Thu Feb 24 11:26:27 2011 +0200 @@ -137,7 +137,9 @@ else setproctitle("%s", title); #elif defined(PROCTITLE_HACK) - proctitle_hack_set(t_strconcat(process_name, " ", title, NULL)); + T_BEGIN { + proctitle_hack_set(t_strconcat(process_name, " ", title, NULL)); + } T_END; #endif }