X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lib%2Fdatabase.cc;h=eddb780c69ebc76ab8870fb93dfb23d01e1a6176;hb=4e649d000b9d3764aea98cb0e1120947d7f76f3d;hp=f0bfe5667fba4736996583830047d7529cd390fc;hpb=928016a4ea0de23960b9c44b9f5d556b8878b5ab;p=notmuch diff --git a/lib/database.cc b/lib/database.cc index f0bfe566..eddb780c 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -652,7 +652,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; } } @@ -661,7 +661,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