rxrpc: Fix a memory leak in rxkad_verify_response()
commitf45d01f4f3upstream. A ticket was not released after a call of the function "rxkad_decrypt_ticket" failed. Thus replace the jump target "temporary_error_free_resp" by "temporary_error_free_ticket". Fixes:8c2f826dc3("rxrpc: Don't put crypto buffers on the stack") Signed-off-by: Qiushi Wu <wu000273@umn.edu> Signed-off-by: David Howells <dhowells@redhat.com> cc: Markus Elfring <Markus.Elfring@web.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0ce2f76e97
commit
e7980748ed
1 changed files with 1 additions and 2 deletions
|
|
@ -1118,7 +1118,7 @@ static int rxkad_verify_response(struct rxrpc_connection *conn,
|
|||
ret = rxkad_decrypt_ticket(conn, skb, ticket, ticket_len, &session_key,
|
||||
&expiry, _abort_code);
|
||||
if (ret < 0)
|
||||
goto temporary_error_free_resp;
|
||||
goto temporary_error_free_ticket;
|
||||
|
||||
/* use the session key from inside the ticket to decrypt the
|
||||
* response */
|
||||
|
|
@ -1200,7 +1200,6 @@ protocol_error:
|
|||
|
||||
temporary_error_free_ticket:
|
||||
kfree(ticket);
|
||||
temporary_error_free_resp:
|
||||
kfree(response);
|
||||
temporary_error:
|
||||
/* Ignore the response packet if we got a temporary error such as
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue