[PATCH -next] rxrpc: Fix the error handling path in rxkad_init_connection_security
Simon Horman
horms at kernel.org
Tue Jul 9 10:58:34 PDT 2024
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 <cuigaosheng1 at huawei.com>
Reviewed-by: Simon Horman <horms at kernel.org>
As an aside, the BUG() in the middle of rxkad_init_connection_security()
is a bit of a surprise.
More information about the linux-afs
mailing list