From: Karel Zak Date: Thu, 20 Sep 2012 07:31:54 +0000 (+0200) Subject: add notmuch_{query,message}_destroy to DB checker X-Git-Tag: neomutt-20160404~13^2~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=adfa29482d1c1760928faec9a8f144cc2df9b7b3;p=neomutt add notmuch_{query,message}_destroy to DB checker Reported-by: Chris Mason Signed-off-by: Karel Zak --- diff --git a/mutt_notmuch.c b/mutt_notmuch.c index 5b190d344..c84157a04 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -1474,6 +1474,7 @@ int nm_check_database(CONTEXT *ctx, int *index_hint) if (!h) { /* new email */ append_message(ctx, m); + notmuch_message_destroy(m); continue; } @@ -1502,6 +1503,8 @@ int nm_check_database(CONTEXT *ctx, int *index_hint) if (update_header_tags(h, m) == 0) new_flags++; + + notmuch_message_destroy(m); } for (i = 0; i < ctx->msgcount; i++) { @@ -1514,6 +1517,9 @@ int nm_check_database(CONTEXT *ctx, int *index_hint) 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);