Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72ef9c41 authored by Hannes Frederic Sowa's avatar Hannes Frederic Sowa Committed by David S. Miller
Browse files

dccp: fix memory leak during tear-down of unsuccessful connection request



This patch fixes a memory leak, which happens if the connection request
is not fulfilled between parsing the DCCP options and handling the SYN
(because e.g. the backlog is full), because we forgot to free the
list of ack vectors.

Reported-by: default avatarJianwen Ji <jiji@redhat.com>
Signed-off-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b20e2d54
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -749,6 +749,7 @@ static void ccid2_hc_tx_exit(struct sock *sk)
	for (i = 0; i < hc->tx_seqbufc; i++)
		kfree(hc->tx_seqbuf[i]);
	hc->tx_seqbufc = 0;
	dccp_ackvec_parsed_cleanup(&hc->tx_av_chunks);
}

static void ccid2_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)