dovecot-1.2: mbox-snarf plugin: Fixed memory/io leaking.
dovecot at dovecot.org
dovecot at dovecot.org
Fri May 1 21:53:58 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/66b6cd495702
changeset: 9007:66b6cd495702
user: Timo Sirainen <tss at iki.fi>
date: Fri May 01 14:53:52 2009 -0400
description:
mbox-snarf plugin: Fixed memory/io leaking.
diffstat:
1 file changed, 10 insertions(+)
src/plugins/mbox-snarf/mbox-snarf-plugin.c | 10 ++++++++++
diffs (27 lines):
diff -r 06bd1266f0c7 -r 66b6cd495702 src/plugins/mbox-snarf/mbox-snarf-plugin.c
--- a/src/plugins/mbox-snarf/mbox-snarf-plugin.c Fri May 01 14:50:08 2009 -0400
+++ b/src/plugins/mbox-snarf/mbox-snarf-plugin.c Fri May 01 14:53:52 2009 -0400
@@ -124,6 +124,15 @@ mbox_snarf_sync_init(struct mailbox *box
mbox_snarf(mbox->spool_mbox, box);
return mbox->module_ctx.super.sync_init(box, flags);
+}
+
+static int mbox_snarf_close(struct mailbox *box)
+{
+ struct mbox_snarf_mailbox *mbox = MBOX_SNARF_CONTEXT(box);
+
+ if (mbox->spool_mbox != NULL)
+ mailbox_close(&mbox->spool_mbox);
+ return mbox->module_ctx.super.close(box);
}
static struct mailbox *
@@ -169,6 +178,7 @@ mbox_snarf_mailbox_open(struct mail_stor
mbox->module_ctx.super = box->v;
box->v.sync_init = mbox_snarf_sync_init;
+ box->v.close = mbox_snarf_close;
MODULE_CONTEXT_SET(box, mbox_snarf_storage_module, mbox);
return box;
}
More information about the dovecot-cvs
mailing list