aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/thread.cc')
-rw-r--r--lib/thread.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/thread.cc b/lib/thread.cc
index b29f2c92..5190a663 100644
--- a/lib/thread.cc
+++ b/lib/thread.cc
@@ -397,7 +397,7 @@ _notmuch_thread_create (void *ctx,
notmuch_thread_t *thread;
notmuch_message_t *seed_message;
const char *thread_id;
- const char *thread_id_query_string;
+ char *thread_id_query_string;
notmuch_query_t *thread_id_query;
notmuch_messages_t *messages;
@@ -416,6 +416,8 @@ _notmuch_thread_create (void *ctx,
if (unlikely (thread_id_query == NULL))
return NULL;
+ talloc_free (thread_id_query_string);
+
thread = talloc (ctx, notmuch_thread_t);
if (unlikely (thread == NULL))
return NULL;