changeset 22498:9c8e13eb813c

dsync: Fix panic if syncing fails during attribute iteration Fixes: Panic: file dict.c: line 104 (dict_deinit): assertion failed: (dict->iter_count == 0)
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Tue, 13 Jun 2017 21:00:23 +0300
parents c836d071d8a7
children 87723fc92363
files src/doveadm/dsync/dsync-mailbox-export.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/doveadm/dsync/dsync-mailbox-export.c	Fri Aug 25 18:02:44 2017 +0300
+++ b/src/doveadm/dsync/dsync-mailbox-export.c	Tue Jun 13 21:00:23 2017 +0300
@@ -928,6 +928,8 @@
 
 	*_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)