Subject: Re: [PATCH -next] rxrpc: Fix the error handling path in rxkad_init_connection_security

From: Simon Horman <[email-masked]>
Date: Tue, 9 Jul 2024 18:58:34 +0100

On Tue, Jul 09, 2024 at 06:49:10PM +0800, Gaosheng Cui wrote:
> If security_level of rxrpc_connection is invalid, ci should be freed
> by crypto_free_sync_skcipher, replace error with error_ci to fix the
> memory leak.
> 
> Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
> Signed-off-by: Gaosheng Cui <[email-masked]>

Reviewed-by: Simon Horman <[email-masked]>

As an aside, the BUG() in the middle of rxkad_init_connection_security()
is a bit of a surprise.