[PATCH] trace-cmd sqlhist: Fix missing initialization of a var

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>

The variable "var" was used without being initialized and caused bugs when
it wasn't set via: -m or -c options.

Fixes: 1d5ac88ee ("trace-cmd sqlhist: Add 'sqlhist' command")
Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
---
 tracecmd/trace-sqlhist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tracecmd/trace-sqlhist.c b/tracecmd/trace-sqlhist.c
index f53feb24..9e304e43 100644
--- a/tracecmd/trace-sqlhist.c
+++ b/tracecmd/trace-sqlhist.c
@@ -137,7 +137,7 @@ void trace_sqlhist (int argc, char **argv)
 	bool execute = false;
 	char **save_fields = NULL;
 	const char *name;
-	const char *var;
+	const char *var = NULL;
 	char **save_argv;
 	int action = 0;
 	char *tok;
-- 
2.43.0





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux