]> rtime.felk.cvut.cz Git - notmuch.git/blobdiff - lib/thread.cc
notmuch search: Clean up some memory leaks during search loop.
[notmuch.git] / lib / thread.cc
index b29f2c92a3fd5c8856455e655669c806bf0253ee..5190a663d1fbbd16583635d690ef2acb9b903d39 100644 (file)
@@ -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;