Skip to content

Commit adcc878

Browse files
lxingregkh
authored andcommitted
dccp: fix a memleak that dccp_ipv4 doesn't put reqsk properly
[ Upstream commit b7953d3c0e30a5fc944f6b7bd0bcceb0794bcd85 ] The patch "dccp: fix a memleak that dccp_ipv6 doesn't put reqsk properly" fixed reqsk refcnt leak for dccp_ipv6. The same issue exists on dccp_ipv4. This patch is to fix it for dccp_ipv4. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c3278ed commit adcc878

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/dccp/ipv4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
635635
goto drop_and_free;
636636

637637
inet_csk_reqsk_queue_hash_add(sk, req, DCCP_TIMEOUT_INIT);
638+
reqsk_put(req);
638639
return 0;
639640

640641
drop_and_free:

0 commit comments

Comments
 (0)