Reported-by: Chris Mason <chris.mason@fusionio.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
if (!h) {
/* new email */
append_message(ctx, m);
+ notmuch_message_destroy(m);
continue;
}
if (update_header_tags(h, m) == 0)
new_flags++;
+
+ notmuch_message_destroy(m);
}
for (i = 0; i < ctx->msgcount; i++) {
if (ctx->msgcount > oldmsgcount)
mx_update_context(ctx, ctx->msgcount - oldmsgcount);
done:
+ if (q)
+ notmuch_query_destroy(q);
+
if (!is_longrun(data))
release_db(data);