dovecot-2.2: lib-index: Memory leak fix
dovecot at dovecot.org
dovecot at dovecot.org
Tue Feb 5 03:24:58 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/be320a216190
changeset: 15737:be320a216190
user: Timo Sirainen <tss at iki.fi>
date: Tue Feb 05 03:23:59 2013 +0200
description:
lib-index: Memory leak fix
diffstat:
src/lib-index/mail-index-transaction-update.c | 4 ++++
src/lib-index/test-mail-index-transaction-update.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diffs (42 lines):
diff -r c31ee24e7255 -r be320a216190 src/lib-index/mail-index-transaction-update.c
--- a/src/lib-index/mail-index-transaction-update.c Tue Feb 05 03:23:46 2013 +0200
+++ b/src/lib-index/mail-index-transaction-update.c Tue Feb 05 03:23:59 2013 +0200
@@ -1034,6 +1034,7 @@
{
struct mail_index_transaction_keyword_update *u;
struct mail_keywords *add_keywords = NULL, *remove_keywords = NULL;
+ struct mail_keywords *unref_keywords = NULL;
unsigned int i;
bool changed;
@@ -1069,6 +1070,7 @@
if (seq < t->first_new_seq) {
/* remove the ones currently in index */
remove_keywords = keyword_update_remove_existing(t, seq);
+ unref_keywords = remove_keywords;
}
/* remove from all changes we've done in this transaction */
array_foreach_modifiable(&t->keyword_updates, u)
@@ -1107,6 +1109,8 @@
seq_range_array_remove(&u->remove_seq, seq);
}
}
+ if (unref_keywords != NULL)
+ mail_index_keywords_unref(&unref_keywords);
t->log_updates = TRUE;
}
diff -r c31ee24e7255 -r be320a216190 src/lib-index/test-mail-index-transaction-update.c
--- a/src/lib-index/test-mail-index-transaction-update.c Tue Feb 05 03:23:46 2013 +0200
+++ b/src/lib-index/test-mail-index-transaction-update.c Tue Feb 05 03:23:59 2013 +0200
@@ -57,6 +57,10 @@
return NULL;
}
+void mail_index_keywords_unref(struct mail_keywords **keywords ATTR_UNUSED)
+{
+}
+
static struct mail_index_transaction *
mail_index_transaction_new(void)
{
More information about the dovecot-cvs
mailing list