diff options
| author | Feng Yang <yangfeng@kylinos.cn> | 2026-07-07 16:14:34 +0800 |
|---|---|---|
| committer | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2026-07-07 21:09:48 +0200 |
| commit | 602701718649936eb287bf6c7ecf870ec54c6f71 (patch) | |
| tree | f407b2b3a7ac09956d51a4bf254a281fe830070e /tools/perf/scripts/python/bin | |
| parent | 5de7a6eaed89b45b91ca1830a7ddda7d8f50673b (diff) | |
selftests/bpf: Fix memory leak in msg_alloc_iov
In the msg_alloc_iov function, the iov pointer is only assigned to
msg->msg_iov after all memory allocations complete successfully.
Therefore, when a calloc failure triggers the unwind_iov cleanup branch,
we should use the local variable iov instead of msg->msg_iov.
Fixes: 753fb2ee0934 ("bpf: sockmap, add msg_peek tests to test_sockmap")
Signed-off-by: Feng Yang <yangfeng@kylinos.cn>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20260707081434.539327-1-yangfeng59949@163.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
