diff options
author | Steven Rostedt (VMware) <[email protected]> | 2021-08-16 23:42:58 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <[email protected]> | 2021-08-18 18:13:52 -0400 |
commit | fcd9db51df8e219e3a61b14e9b8c5ee67d39d37c (patch) | |
tree | 0671bc04f821d0771db6493de20acdffd54c104b /scripts/gdb/linux/lists.py | |
parent | 1d18538e6a09265003a0a94ca779d7a6127cb76c (diff) |
tracing/probe: Have traceprobe_parse_probe_arg() take a const arg
The two places that call traceprobe_parse_probe_arg() allocate a temporary
buffer to copy the argv[i] into, because argv[i] is constant and the
traceprobe_parse_probe_arg() will modify it to do the parsing. These two
places allocate this buffer and then free it right after calling this
function, leaving the onus of this allocation to the caller.
As there's about to be a third user of this function that will have to do
the same thing, instead of having the caller allocate the temporary
buffer, simply move that allocation into the traceprobe_parse_probe_arg()
itself, which will simplify the code of the callers.
Link: https://lkml.kernel.org/r/[email protected]
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/lists.py')
0 files changed, 0 insertions, 0 deletions