mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
dlm: fix double-release of socket in error exit path
The last correction to the tcp_connect_to_sock error exit path, commita89d63a159
, can free an already freed socket, due to collision with a previous (incomplete) attempt to fix the same issue, commit311f6fc77c
. Signed-off-by: Casey Dahlin <cdahlin@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
df4ecf1524
commit
b5711b8e5a
1 changed files with 1 additions and 3 deletions
|
@ -926,10 +926,8 @@ 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)) {
|
||||
sock_release(sock);
|
||||
if (dlm_nodeid_to_addr(con->nodeid, &saddr))
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
sock->sk->sk_user_data = con;
|
||||
con->rx_action = receive_from_sock;
|
||||
|
|
Loading…
Reference in a new issue