Commit 456b2f2d authored by David Howells's avatar David Howells

rxrpc: Fix an error goto in rxrpc_connect_call()

Fix an error-handling goto in rxrpc_connect_call() whereby it will jump to
free the bundle it failed to allocate.

Fixes: 245500d8 ("rxrpc: Rewrite the client connection manager")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent e059c6f3
...@@ -724,8 +724,9 @@ int rxrpc_connect_call(struct rxrpc_sock *rx, ...@@ -724,8 +724,9 @@ int rxrpc_connect_call(struct rxrpc_sock *rx,
/* Paired with the write barrier in rxrpc_activate_one_channel(). */ /* Paired with the write barrier in rxrpc_activate_one_channel(). */
smp_rmb(); smp_rmb();
out: out_put_bundle:
rxrpc_put_bundle(bundle); rxrpc_put_bundle(bundle);
out:
_leave(" = %d", ret); _leave(" = %d", ret);
return ret; return ret;
...@@ -742,7 +743,7 @@ int rxrpc_connect_call(struct rxrpc_sock *rx, ...@@ -742,7 +743,7 @@ int rxrpc_connect_call(struct rxrpc_sock *rx,
trace_rxrpc_client(call->conn, ret, rxrpc_client_chan_wait_failed); trace_rxrpc_client(call->conn, ret, rxrpc_client_chan_wait_failed);
rxrpc_set_call_completion(call, RXRPC_CALL_LOCAL_ERROR, 0, ret); rxrpc_set_call_completion(call, RXRPC_CALL_LOCAL_ERROR, 0, ret);
rxrpc_disconnect_client_call(bundle, call); rxrpc_disconnect_client_call(bundle, call);
goto out; goto out_put_bundle;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment