Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free strdup memory in selftests #6908

Closed

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: Free strdup memory in selftests
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=848738

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 6e25bcf
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=848738
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 07801a2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=848738
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 89de2db
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=848738
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0db63c0
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=848738
version: 1

Geliang Tang added 2 commits April 29, 2024 16:19
The strdup() function returns a pointer to a new string which is a
duplicate of the string "ptr". Memory for the new string is obtained
with malloc(), and need to be freed with free().

This patch adds these missing "free(ptr)" in check_whitelist() and
check_blacklist() to avoid memory leaks in test_sockmap.c.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Acked-by: John Fastabend <john.fastabend@gmail.com>
The strdup() function returns a pointer to a new string which is a
duplicate of the string "input". Memory for the new string is obtained
with malloc(), and need to be freed with free().

This patch adds these missing "free(input)" in parse_stats() to avoid
memory leak in veristat.c.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Acked-by: John Fastabend <john.fastabend@gmail.com>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: cb01621
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=848738
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=848738 irrelevant now. Closing PR.

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot deleted the series/848738=>bpf-next branch April 29, 2024 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
0 participants