summaryrefslogtreecommitdiff
path: root/rust/helpers/processor.c
diff options
context:
space:
mode:
authorZilin Guan <zilin@seu.edu.cn>2025-11-06 12:01:32 +0000
committerSteven Rostedt (Google) <rostedt@goodmis.org>2025-11-06 19:51:33 -0500
commit80f0d631dcc76ee1b7755bfca1d8417d91d71414 (patch)
treee128e32a12b0d5f283b4c256e5473ca25901138d /rust/helpers/processor.c
parentaa997d2d2a0b2e76f4df0f1f12829f02acb4fb6b (diff)
tracing: Fix memory leaks in create_field_var()
The function create_field_var() allocates memory for 'val' through create_hist_field() inside parse_atom(), and for 'var' through create_var(), which in turn allocates var->type and var->var.name internally. Simply calling kfree() to release these structures will result in memory leaks. Use destroy_hist_field() to properly free 'val', and explicitly release the memory of var->type and var->var.name before freeing 'var' itself. Link: https://patch.msgid.link/20251106120132.3639920-1-zilin@seu.edu.cn Fixes: 02205a6752f22 ("tracing: Add support for 'field variables'") Signed-off-by: Zilin Guan <zilin@seu.edu.cn> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'rust/helpers/processor.c')
0 files changed, 0 insertions, 0 deletions