diff options
author | David Howells <dhowells@redhat.com> | 2020-09-14 13:57:13 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2020-09-14 13:58:17 +0200 |
commit | 456b2f2dc7e585e1a031214c5698f1b00e02448b (patch) | |
tree | e50b14f4f138e20665000a3cf2d02db40b21d48a /net/rxrpc/conn_client.c | |
parent | tulip: switch from 'pci_' to 'dma_' API (diff) | |
download | linux-456b2f2dc7e585e1a031214c5698f1b00e02448b.tar.xz linux-456b2f2dc7e585e1a031214c5698f1b00e02448b.zip |
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: 245500d853e9 ("rxrpc: Rewrite the client connection manager")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_client.c')
-rw-r--r-- | net/rxrpc/conn_client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c index 0e4e1879c24d..180be4da8d26 100644 --- a/net/rxrpc/conn_client.c +++ b/net/rxrpc/conn_client.c @@ -724,8 +724,9 @@ granted_channel: /* Paired with the write barrier in rxrpc_activate_one_channel(). */ smp_rmb(); -out: +out_put_bundle: rxrpc_put_bundle(bundle); +out: _leave(" = %d", ret); return ret; @@ -742,7 +743,7 @@ 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_disconnect_client_call(bundle, call); - goto out; + goto out_put_bundle; } /* |