|
@@ -70,14 +70,13 @@ int thread__set_comm(struct thread *thread, const char *str, u64 timestamp)
|
|
|
/* Override latest entry if it had no specific time coverage */
|
|
|
if (!curr->start) {
|
|
|
comm__override(curr, str, timestamp);
|
|
|
- return 0;
|
|
|
+ } else {
|
|
|
+ new = comm__new(str, timestamp);
|
|
|
+ if (!new)
|
|
|
+ return -ENOMEM;
|
|
|
+ list_add(&new->list, &thread->comm_list);
|
|
|
}
|
|
|
|
|
|
- new = comm__new(str, timestamp);
|
|
|
- if (!new)
|
|
|
- return -ENOMEM;
|
|
|
-
|
|
|
- list_add(&new->list, &thread->comm_list);
|
|
|
thread->comm_set = true;
|
|
|
|
|
|
return 0;
|