(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

selftests/net: bind_bhash: fix memory leak in bind_socket

The getaddrinfo() call in bind_socket() dynamically allocates memory for the result linked list that must be freed with freeaddrinfo(). However, none of the code paths after a successful getaddrinfo() call free this memory, causing a leak in every invocation of bind_socket(). Signed-off-by: longlong yan <yanlonglong@kylinos.cn> Link: https://patch.msgid.link/20260601013927.1835-1-yanlonglong@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>


Author longlong yan Committer Jakub Kicinski Date Commit Parent edceeba4
+5 -4
1 changed file
+5 -4
1 changed file