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

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
...@@ -749,6 +749,7 @@ static void ccid2_hc_tx_exit(struct sock *sk) ...@@ -749,6 +749,7 @@ static void ccid2_hc_tx_exit(struct sock *sk)
for (i = 0; i < hc->tx_seqbufc; i++) for (i = 0; i < hc->tx_seqbufc; i++)
kfree(hc->tx_seqbuf[i]); kfree(hc->tx_seqbuf[i]);
hc->tx_seqbufc = 0; 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) static void ccid2_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
......
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