rxrpc: uninitialized variable in rxrpc_send_ack_packet()
authorDan Carpenter <error27@gmail.com>
Thu, 17 Nov 2022 07:44:02 +0000 (10:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Nov 2022 12:03:01 +0000 (12:03 +0000)
The "pkt" was supposed to have been deleted in a previous patch.  It
leads to an uninitialized variable bug.

Fixes: 72f0c6fb0579 ("rxrpc: Allocate ACK records at proposal and queue for transmission")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rxrpc/output.c

index 46432e70a16b649fabd295a6a3f1d447de020c13..04f945e042aba14b35673ecb61edb2135542c40b 100644 (file)
@@ -202,7 +202,6 @@ static void rxrpc_cancel_rtt_probe(struct rxrpc_call *call,
 static int rxrpc_send_ack_packet(struct rxrpc_local *local, struct rxrpc_txbuf *txb)
 {
        struct rxrpc_connection *conn;
-       struct rxrpc_ack_buffer *pkt;
        struct rxrpc_call *call = txb->call;
        struct msghdr msg;
        struct kvec iov[1];
@@ -270,7 +269,6 @@ static int rxrpc_send_ack_packet(struct rxrpc_local *local, struct rxrpc_txbuf *
                rxrpc_set_keepalive(call);
        }
 
-       kfree(pkt);
        return ret;
 }