netjack2: go to the right error label

socket_failed is for when the socket fd failed, otherwise we need to do
cleanup.
This commit is contained in:
Wim Taymans 2026-05-05 17:14:02 +02:00
parent c2bf8c920e
commit b9761926df

View file

@ -1111,7 +1111,7 @@ static int handle_follower_available(struct impl *impl, struct nj2_session_param
if (follower->setup_socket == NULL) {
res = -errno;
pw_log_error("can't create setup source: %m");
goto socket_failed;
goto cleanup;
}
follower->socket = pw_loop_add_io(impl->data_loop, fd,
@ -1119,7 +1119,7 @@ static int handle_follower_available(struct impl *impl, struct nj2_session_param
if (follower->socket == NULL) {
res = -errno;
pw_log_error("can't create data source: %m");
goto socket_failed;
goto cleanup;
}
peer->fd = fd;
peer->our_stream = 's';