Skip to content

Commit

Permalink
ql: #132: do not try to free notmuch_threads_destory on unsuccessfull…
Browse files Browse the repository at this point in the history
… search
  • Loading branch information
gauteh committed Apr 20, 2017
1 parent dd51519 commit 79ef1c6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/modes/thread_index/query_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,8 @@ namespace Astroid {
void QueryLoader::loader () {
std::lock_guard<std::mutex> loader_lk (loader_m);

make_stats ();

/* important: we cannot safely output debug info from this thread */

Db db (Db::DATABASE_READ_ONLY);
refresh_stats_db (&db);

/* set up query */
notmuch_query_t * nmquery;
Expand Down Expand Up @@ -192,7 +189,7 @@ namespace Astroid {
}

/* closing query */
notmuch_threads_destroy (threads);
if (st == NOTMUCH_STATUS_SUCCESS) notmuch_threads_destroy (threads);
notmuch_query_destroy (nmquery);

if (!in_destructor)
Expand Down

0 comments on commit 79ef1c6

Please sign in to comment.