Use trace->trace_id in check to remove trace from bt_ctx
Commit
b9e6498df8b3e7c2ad312dccddf9f1a5e181648e removes the existence
guarantee of the trace_id hash table key by moving the trace->in_use
assignation before the assignation of trace_id and insertion into the
hash table.
Use the trade_id field value to validate if it should be removed from
the hash table. A NULL trace_id field indicates that no insertion was
performed.
This is mostly a workaround to a problem found in, at least, glib 2.28
where g_hash_table_lookup_node() aborts on a SIGFPE signal due to
modulo by zero. The exact cause for this is unknown for now, but a
similar problem was reported against Nautilus [1].
There is little reason for "mod" to be 0 at that point, as explained
in the bug report.
Currently unable to reproduce.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=
1074401
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>