]> 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)
committerGitLab <gitlab@git.dovecot.net>
Wed, 14 Jun 2017 13:44:04 +0000 (16:44 +0300)
Fixes:
Panic: file dict.c: line 104 (dict_deinit): assertion failed: (dict->iter_count == 0)

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

index 81f46829d60fd7aae9614585797e0650a57288a7..75f45b4bc157834599712419c0cc6452a8e80ec0 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)