Mercurial > dovecot > core-2.2
changeset 18913:501ce127ae05
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.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 19 Jul 2015 10:57:26 +0300 |
parents | 64568a033fc8 |
children | a83cc1411205 |
files | src/lib-storage/index/index-attribute.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);