Message ID | 20241205144439.127564-6-jmarchan@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a1b5eee68468338cdd34d9abeb26c701add3340c |
Headers | show |
Series | trace-cmd: Fix misc issues uncoverd by static analysis | expand |
diff --git a/tracecmd/trace-sqlhist.c b/tracecmd/trace-sqlhist.c index 9e304e43..9f2b94e6 100644 --- a/tracecmd/trace-sqlhist.c +++ b/tracecmd/trace-sqlhist.c @@ -136,7 +136,7 @@ void trace_sqlhist (int argc, char **argv) const char *instance = NULL; bool execute = false; char **save_fields = NULL; - const char *name; + const char *name = NULL; const char *var = NULL; char **save_argv; int action = 0;
The variable name in trace_sqlhist() can be used uninitialized in do_sql() if it's not set with -n option. Initialize it to NULL like the other strings. Signed-off-by: Jerome Marchand <jmarchan@redhat.com> --- tracecmd/trace-sqlhist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)