|
@@ -389,7 +389,6 @@ static struct thread *__machine__findnew_thread(struct machine *machine,
|
|
|
if (th != NULL) {
|
|
|
rb_link_node(&th->rb_node, parent, p);
|
|
|
rb_insert_color(&th->rb_node, &machine->threads);
|
|
|
- machine->last_match = th;
|
|
|
|
|
|
/*
|
|
|
* We have to initialize map_groups separately
|
|
@@ -400,9 +399,12 @@ static struct thread *__machine__findnew_thread(struct machine *machine,
|
|
|
* leader and that would screwed the rb tree.
|
|
|
*/
|
|
|
if (thread__init_map_groups(th, machine)) {
|
|
|
+ rb_erase(&th->rb_node, &machine->threads);
|
|
|
thread__delete(th);
|
|
|
return NULL;
|
|
|
}
|
|
|
+
|
|
|
+ machine->last_match = th;
|
|
|
}
|
|
|
|
|
|
return th;
|