diff options
| author | David Bremner <david@tethera.net> | 2017-02-23 09:08:15 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-02-23 09:08:15 -0400 |
| commit | e0e8586fc72763571f9eafeb831c7bc79a15273d (patch) | |
| tree | 70fc4d756b58c9b4b570741c52520c47cf96895b /lib/database.cc | |
| parent | 2c5eed16b3b0bff9b6f488d3949ebdb62e8d1c35 (diff) | |
| parent | 48253190adb70fcc1783beeeb386c19ff4832fa9 (diff) | |
Merge branch 'release'
Merge in g_hash_table read-after-free fix
Diffstat (limited to 'lib/database.cc')
| -rw-r--r-- | lib/database.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/database.cc b/lib/database.cc index 8016c4df..386dcd17 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -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 |
