]> git.notmuchmail.org Git - notmuch/blobdiff - lib/database.cc
Merge branch 'release'
[notmuch] / lib / database.cc
index 8016c4df3d167c2c6fd30dbbe5e3ba66dd3fbffc..386dcd17adc4d0a91ab5eb10479907b254d32187 100644 (file)
@@ -644,7 +644,7 @@ parse_references (void *ctx,
        ref = _parse_message_id (ctx, refs, &refs);
 
        if (ref && strcmp (ref, message_id)) {
-           g_hash_table_insert (hash, ref, NULL);
+           g_hash_table_add (hash, ref);
            last_ref = ref;
        }
     }
@@ -653,7 +653,7 @@ parse_references (void *ctx,
      * reference to the database.  We should avoid making a message
      * its own parent, thus the above check.
      */
-    return last_ref;
+    return talloc_strdup(ctx, last_ref);
 }
 
 notmuch_status_t