diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2010-06-22 21:08:56 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2010-06-22 21:08:56 -0400 |
| commit | a02e89d02581d8c4d242d236ffd27b0f41aefef4 (patch) | |
| tree | 3a2611e097f560b9b8ea23140b6b1b9004a1209b | |
| parent | 8d48e0db6a91351be925eec5508fc54342669531 (diff) | |
trace-graph: Set comm to NULL if field not found
If the event_comm_field has not been set (does not exist)
then we must also set comm to NULL so that later in the
function, it does not reference the comm variable.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rw-r--r-- | trace-graph.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/trace-graph.c b/trace-graph.c index edd106f..f940874 100644 --- a/trace-graph.c +++ b/trace-graph.c | |||
| @@ -1113,6 +1113,8 @@ int trace_graph_check_sched_switch(struct graph_info *ginfo, | |||
| 1113 | pevent_read_number_field(ginfo->ftrace_pid_field, record->data, &val); | 1113 | pevent_read_number_field(ginfo->ftrace_pid_field, record->data, &val); |
| 1114 | if (comm && ginfo->ftrace_comm_field) | 1114 | if (comm && ginfo->ftrace_comm_field) |
| 1115 | *comm = record->data + ginfo->ftrace_comm_field->offset; | 1115 | *comm = record->data + ginfo->ftrace_comm_field->offset; |
| 1116 | else | ||
| 1117 | comm = NULL; | ||
| 1116 | if (pid) | 1118 | if (pid) |
| 1117 | *pid = val; | 1119 | *pid = val; |
| 1118 | goto out; | 1120 | goto out; |
