Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5711b8e authored by Casey Dahlin's avatar Casey Dahlin Committed by David Teigland
Browse files

dlm: fix double-release of socket in error exit path



The last correction to the tcp_connect_to_sock error exit path,
commit a89d63a1, can free an already
freed socket, due to collision with a previous (incomplete) attempt
to fix the same issue, commit 311f6fc7.

Signed-off-by: default avatarCasey Dahlin <cdahlin@redhat.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent df4ecf15
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;