diff options
author | Tom Rix <[email protected]> | 2020-09-07 06:58:45 -0700 |
---|---|---|
committer | Steven Rostedt (VMware) <[email protected]> | 2020-09-18 13:16:40 -0400 |
commit | 46bbe5c671e06f070428b9be142cc4ee5cedebac (patch) | |
tree | 4a850c5d79dcd719ba0cc74654377baec83378b6 /net/switchdev/switchdev.c | |
parent | 54fa9ba564b717fc2cf689427e195c360315999d (diff) |
tracing: fix double free
clang static analyzer reports this problem
trace_events_hist.c:3824:3: warning: Attempt to free
released memory
kfree(hist_data->attrs->var_defs.name[i]);
In parse_var_defs() if there is a problem allocating
var_defs.expr, the earlier var_defs.name is freed.
This free is duplicated by free_var_defs() which frees
the rest of the list.
Because free_var_defs() has to run anyway, remove the
second free fom parse_var_defs().
Link: https://lkml.kernel.org/r/[email protected]
Cc: [email protected]
Fixes: 30350d65ac56 ("tracing: Add variable support to hist triggers")
Reviewed-by: Tom Zanussi <[email protected]>
Signed-off-by: Tom Rix <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions