提交 311f6fc7 编写于 作者: M Masatake YAMATO 提交者: David Teigland

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: NChristine Caulfield <ccaulfie@redhat.com>
Signed-off-by: NMasatake YAMATO <yamato@redhat.com>
Signed-off-by: NDavid Teigland <teigland@redhat.com>
上级 329fc4c3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册