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

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
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -724,8 +724,9 @@ int rxrpc_connect_call(struct rxrpc_sock *rx,
	/* 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 @@ int rxrpc_connect_call(struct rxrpc_sock *rx,
	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;
}

/*