aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2015-03-02 15:47:43 -0500
committerSteven Rostedt <rostedt@goodmis.org>2015-03-24 15:21:37 -0400
commitc49f58a8eac527a7e14056aaf2bc9e404e08ac36 (patch)
tree7c9e68789b736ea5fbad90e8e66e2e3ca4dfe87c
parent7a0ead47bdb85288c855fafae24719b1ca9b907e (diff)
downloadtrace-cmd-c49f58a8eac527a7e14056aaf2bc9e404e08ac36.tar.gz
trace-cmd: Fix possible uninitialized variable in function_handler
The function handler plugin uses "index" which could possibly be uninitialized if the parent function is not found. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--plugin_function.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin_function.c b/plugin_function.c
index 0defd110..f5e8a08f 100644
--- a/plugin_function.c
+++ b/plugin_function.c
@@ -129,7 +129,7 @@ static int function_handler(struct trace_seq *s, struct pevent_record *record,
unsigned long long pfunction;
const char *func;
const char *parent;
- int index;
+ int index = 0;
if (pevent_get_field_val(s, event, "ip", record, &function, 1))
return trace_seq_putc(s, '!');