]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Avoid unnecessary data stack memory usage.
authorTimo Sirainen <tss@iki.fi>
Thu, 20 Mar 2014 15:07:32 +0000 (17:07 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 20 Mar 2014 15:07:32 +0000 (17:07 +0200)
src/doveadm/dsync/dsync-mailbox-export.c

index 20980fcdda9bb31d86f5575b77a35018e56187a7..9f1f11d5317737a0e5924b3e95f294a9a09657ef 100644 (file)
@@ -374,10 +374,12 @@ dsync_mailbox_export_search(struct dsync_mailbox_exporter *exporter)
        mail_search_args_unref(&search_args);
 
        while (mailbox_search_next(search_ctx, &mail)) {
-               if (mail->uid <= exporter->last_common_uid)
-                       ret = search_update_flag_change_guid(exporter, mail);
-               else
-                       ret = search_add_save(exporter, mail);
+               T_BEGIN {
+                       if (mail->uid <= exporter->last_common_uid)
+                               ret = search_update_flag_change_guid(exporter, mail);
+                       else
+                               ret = search_add_save(exporter, mail);
+               } T_END;
                if (ret < 0)
                        break;
        }