diff options
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 8e5e4f6137bb..31d4e7da191c 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -304,7 +304,10 @@ int pevent_register_comm(struct pevent *pevent, const char *comm, int pid) | |||
304 | if (!item) | 304 | if (!item) |
305 | return -1; | 305 | return -1; |
306 | 306 | ||
307 | item->comm = strdup(comm); | 307 | if (comm) |
308 | item->comm = strdup(comm); | ||
309 | else | ||
310 | item->comm = strdup("<...>"); | ||
308 | if (!item->comm) { | 311 | if (!item->comm) { |
309 | free(item); | 312 | free(item); |
310 | return -1; | 313 | return -1; |