]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix memory leak in tipc_accept_from_sock()
authorJon Maloy <jon.maloy@ericsson.com>
Mon, 4 Dec 2017 21:00:20 +0000 (22:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Dec 2017 19:52:41 +0000 (14:52 -0500)
commit8803b2baaa40c416681a8792647ba6bb14d722d7
tree7eea9f2bf7169a373ef0c4a69d5a410d051e5a51
parent62a7aa463048de20a424ba7679b7a1bbf3aba0a2
tipc: fix memory leak in tipc_accept_from_sock()

When the function tipc_accept_from_sock() fails to create an instance of
struct tipc_subscriber it omits to free the already created instance of
struct tipc_conn instance before it returns.

We fix that with this commit.

Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/server.c