Commit d04322a0 authored by David S. Miller's avatar David S. Miller

Merge tag 'rxrpc-fixes-20200523-v2' of...

Merge tag 'rxrpc-fixes-20200523-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs

David Howells says:

====================
rxrpc: Fix a warning and a leak [ver #2]

Here are a couple of fixes for AF_RXRPC:

 (1) Fix an uninitialised variable warning.

 (2) Fix a leak of the ticket on error in rxkad.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5a730153 f45d01f4
...@@ -32,7 +32,7 @@ void afs_fileserver_probe_result(struct afs_call *call) ...@@ -32,7 +32,7 @@ void afs_fileserver_probe_result(struct afs_call *call)
struct afs_server *server = call->server; struct afs_server *server = call->server;
unsigned int server_index = call->server_index; unsigned int server_index = call->server_index;
unsigned int index = call->addr_ix; unsigned int index = call->addr_ix;
unsigned int rtt_us; unsigned int rtt_us = 0;
bool have_result = false; bool have_result = false;
int ret = call->error; int ret = call->error;
......
...@@ -1148,7 +1148,7 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, ...@@ -1148,7 +1148,7 @@ static int rxkad_verify_response(struct rxrpc_connection *conn,
ret = rxkad_decrypt_ticket(conn, skb, ticket, ticket_len, &session_key, ret = rxkad_decrypt_ticket(conn, skb, ticket, ticket_len, &session_key,
&expiry, _abort_code); &expiry, _abort_code);
if (ret < 0) if (ret < 0)
goto temporary_error_free_resp; goto temporary_error_free_ticket;
/* use the session key from inside the ticket to decrypt the /* use the session key from inside the ticket to decrypt the
* response */ * response */
...@@ -1230,7 +1230,6 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, ...@@ -1230,7 +1230,6 @@ static int rxkad_verify_response(struct rxrpc_connection *conn,
temporary_error_free_ticket: temporary_error_free_ticket:
kfree(ticket); kfree(ticket);
temporary_error_free_resp:
kfree(response); kfree(response);
temporary_error: temporary_error:
/* Ignore the response packet if we got a temporary error such as /* Ignore the response packet if we got a temporary error such as
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment