]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Avoid unnecessary data stack leaks.
authorTimo Sirainen <tss@iki.fi>
Thu, 24 Feb 2011 09:26:27 +0000 (11:26 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 24 Feb 2011 09:26:27 +0000 (11:26 +0200)
src/imap/imap-sync.c
src/lib-index/mail-index-transaction.c
src/lib/process-title.c

index 1c93ee4cc0840bcf133427ca2fad0f08f18a1968..ad1edb7eac673c38c63020b7a13194e6ca523e5c 100644 (file)
@@ -680,7 +680,7 @@ static bool cmd_sync_drop_fast(struct client *client)
        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 @@ bool cmd_sync_delayed(struct client *client)
        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;
+}
index 95ed239f1f79aa1a4944190518cdfd507e9c05fc..a0d75c2a42e083e326b822b5878cbfed846a96c8 100644 (file)
@@ -132,10 +132,10 @@ mail_index_transaction_commit_real(struct mail_index_transaction *t,
        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)
index 5ccf34bfb5be45cae10e75c92177654eb3fbfe57..7d75b04afee5a946a020edadf1cae10b6787e0df 100644 (file)
@@ -137,7 +137,9 @@ void process_title_set(const char *title ATTR_UNUSED)
        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
 }