dovecot-2.2: lib-storage: Fixed doing multiple changes via mailb...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Jul 19 07:57:41 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/501ce127ae05
changeset: 18913:501ce127ae05
user: Timo Sirainen <tss at iki.fi>
date: Sun Jul 19 10:57:26 2015 +0300
description:
lib-storage: Fixed doing multiple changes via mailbox_attribute_set/unset()
Only the last change was committed and the earlier changes were just leaking
memory.
diffstat:
src/lib-storage/index/index-attribute.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (16 lines):
diff -r 64568a033fc8 -r 501ce127ae05 src/lib-storage/index/index-attribute.c
--- a/src/lib-storage/index/index-attribute.c Thu Jul 16 19:37:22 2015 +0300
+++ b/src/lib-storage/index/index-attribute.c Sun Jul 19 10:57:26 2015 +0300
@@ -170,6 +170,12 @@
}
i_assert(dtransp != NULL);
+ if (*dtransp != NULL) {
+ /* transaction already created */
+ *dtrans_r = *dtransp;
+ return 0;
+ }
+
if (index_storage_get_dict(t->box, type, &dict, mailbox_prefix_r) < 0)
return -1;
*dtransp = *dtrans_r = dict_transaction_begin(dict);
More information about the dovecot-cvs
mailing list