]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Fixed assert-crash / memory leak on error handling path.
authorTimo Sirainen <tss@iki.fi>
Thu, 23 Oct 2014 01:16:48 +0000 (04:16 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 23 Oct 2014 01:16:48 +0000 (04:16 +0300)
src/doveadm/dsync/dsync-mailbox-import.c

index 12f534471d6adac086fb22409b20ff64df93aee5..bc0d6a609544d2bbe91e41b29971e20437fe604d 100644 (file)
@@ -2064,6 +2064,7 @@ dsync_mailbox_save_body(struct dsync_mailbox_importer *importer,
                                error_field, mail->uid,
                                mailbox_get_last_error(importer->box, NULL));
                        importer->failed = TRUE;
+                       mailbox_save_cancel(&save_ctx);
                        return;
                }
                dsync_mailbox_save_set_nonminimal(save_ctx, &mail2);