-
Notifications
You must be signed in to change notification settings - Fork 94
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
Conversation
Upstream branch: 6e25bcf |
1c660c9
to
c70be35
Compare
Upstream branch: 07801a2 |
983942c
to
03d079f
Compare
c70be35
to
d6c3e7a
Compare
Upstream branch: 89de2db |
03d079f
to
aaf5067
Compare
d6c3e7a
to
bc37608
Compare
Upstream branch: 0db63c0 |
aaf5067
to
21c4de5
Compare
bc37608
to
db2a39d
Compare
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>
Upstream branch: cb01621 |
21c4de5
to
0a6e0ae
Compare
db2a39d
to
19fa8c7
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=848738 irrelevant now. Closing PR. |
Pull request for series with
subject: Free strdup memory in selftests
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=848738