]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Fix panic if syncing fails during attribute iteration
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 13 Jun 2017 18:00:23 +0000 (21:00 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 19 Sep 2017 13:20:24 +0000 (16:20 +0300)
Fixes:
Panic: file dict.c: line 104 (dict_deinit): assertion failed: (dict->iter_count == 0)

src/doveadm/dsync/dsync-mailbox-export.c

index 98fe488d770a9dbb912d850d3fd38898839803c1..d46f0ebe8913abe28f184acb3e5b2c322a4837c9 100644 (file)
@@ -928,6 +928,8 @@ int dsync_mailbox_export_deinit(struct dsync_mailbox_exporter **_exporter,
 
        *_exporter = NULL;
 
+       if (exporter->attr_iter != NULL)
+               (void)mailbox_attribute_iter_deinit(&exporter->attr_iter);
        dsync_mailbox_export_body_search_deinit(exporter);
        (void)mailbox_transaction_commit(&exporter->trans);
        if (exporter->wanted_headers != NULL)