diff options
| author | Yuan Chen <chenyuan@kylinos.cn> | 2025-06-20 09:21:33 +0800 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2025-06-20 11:32:36 -0700 |
| commit | 99fe8af069a9fa5b09140518b1364e35713a642e (patch) | |
| tree | c4732a169dcf066cd1d8836db4f766296751b1da /scripts/gdb/linux/utils.py | |
| parent | f8b19aeca1652fcadefce8529cd85e5fd475dd69 (diff) | |
bpftool: Fix memory leak in dump_xx_nlmsg on realloc failure
In function dump_xx_nlmsg(), when realloc() fails to allocate memory,
the original pointer to the buffer is overwritten with NULL. This causes
a memory leak because the previously allocated buffer becomes unreachable
without being freed.
Fixes: 7900efc19214 ("tools/bpf: bpftool: improve output format for bpftool net")
Signed-off-by: Yuan Chen <chenyuan@kylinos.cn>
Reviewed-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/r/20250620012133.14819-1-chenyuan_fl@163.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions
