dovecot-2.0: doveadm import: Free memory used by source storage ...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Nov 29 21:08:40 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/97b3d4b714cf
changeset: 12478:97b3d4b714cf
user: Timo Sirainen <tss at iki.fi>
date: Mon Nov 29 19:08:37 2010 +0000
description:
doveadm import: Free memory used by source storage at deinit.
diffstat:
src/doveadm/doveadm-mail-import.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diffs (26 lines):
diff -r 9e54d61d57fb -r 97b3d4b714cf src/doveadm/doveadm-mail-import.c
--- a/src/doveadm/doveadm-mail-import.c Fri Nov 26 23:06:24 2010 +0000
+++ b/src/doveadm/doveadm-mail-import.c Mon Nov 29 19:08:37 2010 +0000
@@ -180,6 +180,14 @@
&service_user, &user, &error) < 0)
i_fatal("Import user initialization failed: %s", error);
ctx->src_user = user;
+ mail_storage_service_user_free(&service_user);
+}
+
+static void cmd_import_deinit(struct doveadm_mail_cmd_context *_ctx)
+{
+ struct import_cmd_context *ctx = (struct import_cmd_context *)_ctx;
+
+ mail_user_unref(&ctx->src_user);
}
static struct doveadm_mail_cmd_context *cmd_import_alloc(void)
@@ -188,6 +196,7 @@
ctx = doveadm_mail_cmd_alloc(struct doveadm_mail_cmd_context);
ctx->v.init = cmd_import_init;
+ ctx->v.deinit = cmd_import_deinit;
ctx->v.run = cmd_import_run;
return ctx;
}
More information about the dovecot-cvs
mailing list