aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.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 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentring-buffer: Do not warn in ring_buffer_map_get_reader() when reader catches up (diff)
downloadlinux-80f0d631dcc76ee1b7755bfca1d8417d91d71414.tar.gz
linux-80f0d631dcc76ee1b7755bfca1d8417d91d71414.zip
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 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions