mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 07:10:27 +00:00
dlm: release socket on error
It seems that `sock' allocated by sock_create_kern in tcp_connect_to_sock() of dlm/fs/lowcomms.c is not released if dlm_nodeid_to_addr an error. Acked-by: Christine Caulfield <ccaulfie@redhat.com> Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
329fc4c372
commit
311f6fc77c
@ -891,8 +891,10 @@ static void tcp_connect_to_sock(struct connection *con)
|
||||
goto out_err;
|
||||
|
||||
memset(&saddr, 0, sizeof(saddr));
|
||||
if (dlm_nodeid_to_addr(con->nodeid, &saddr))
|
||||
if (dlm_nodeid_to_addr(con->nodeid, &saddr)) {
|
||||
sock_release(sock);
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
sock->sk->sk_user_data = con;
|
||||
con->rx_action = receive_from_sock;
|
||||
|
Loading…
x
Reference in New Issue
Block a user