From: Timo Sirainen Date: Tue, 13 Jun 2017 18:00:23 +0000 (+0300) Subject: dsync: Fix panic if syncing fails during attribute iteration X-Git-Tag: 2.3.0.rc1~1415 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df74814b12ef891a90522b1ced231350afaf1232;p=thirdparty%2Fdovecot%2Fcore.git dsync: Fix panic if syncing fails during attribute iteration Fixes: Panic: file dict.c: line 104 (dict_deinit): assertion failed: (dict->iter_count == 0) --- diff --git a/src/doveadm/dsync/dsync-mailbox-export.c b/src/doveadm/dsync/dsync-mailbox-export.c index 81f46829d6..75f45b4bc1 100644 --- a/src/doveadm/dsync/dsync-mailbox-export.c +++ b/src/doveadm/dsync/dsync-mailbox-export.c @@ -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)