From 07c8b1b48eba7ad2693dbfeaa9916d837f006262 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 20 Mar 2014 17:07:32 +0200 Subject: [PATCH] dsync: Avoid unnecessary data stack memory usage. --- src/doveadm/dsync/dsync-mailbox-export.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/doveadm/dsync/dsync-mailbox-export.c b/src/doveadm/dsync/dsync-mailbox-export.c index 20980fcdda..9f1f11d531 100644 --- a/src/doveadm/dsync/dsync-mailbox-export.c +++ b/src/doveadm/dsync/dsync-mailbox-export.c @@ -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; } -- 2.47.3