]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
sdbox: Add data stack frame when syncing each file
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 27 Dec 2022 10:10:35 +0000 (05:10 -0500)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 11 Jan 2023 21:50:37 +0000 (23:50 +0200)
This could have caused extra memory usage when altmoving lots of mails.

src/lib-storage/index/dbox-single/sdbox-sync.c

index 670b768dec525ad31b208a38212665663523f561..c8a0b549a9e8139c4076f704fdeaa64ab3819bac 100644 (file)
@@ -92,10 +92,10 @@ static void sdbox_sync_add(struct sdbox_sync_context *ctx,
                return;
        }
 
-       for (seq = seq1; seq <= seq2; seq++) {
+       for (seq = seq1; seq <= seq2; seq++) T_BEGIN {
                mail_index_lookup_uid(ctx->sync_view, seq, &uid);
                sdbox_sync_file(ctx, seq, uid, type);
-       }
+       } T_END;
 }
 
 static int sdbox_sync_index(struct sdbox_sync_context *ctx)