]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rxrpc: rxgk: Set error code in rxgk_yfs_decode_ticket()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 16 Apr 2025 11:09:51 +0000 (14:09 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 22 Apr 2025 11:42:27 +0000 (13:42 +0200)
Propagate the error code if key_alloc() fails.  Don't return
success.

Fixes: 9d1d2b59341f ("rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI)")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/Z_-P_1iLDWksH1ik@stanley.mountain
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/rxrpc/rxgk_app.c

index 6206a84395b8b5a28b6986e0b7ffc56312beece1..b94b77a1c31780059dff52566b188e64499d3e79 100644 (file)
@@ -141,6 +141,7 @@ int rxgk_yfs_decode_ticket(struct rxrpc_connection *conn, struct sk_buff *skb,
                        KEY_ALLOC_NOT_IN_QUOTA, NULL);
        if (IS_ERR(key)) {
                _leave(" = -ENOMEM [alloc %ld]", PTR_ERR(key));
+               ret = PTR_ERR(key);
                goto error;
        }