tcp: cookie transactions setsockopt memory leak
commit77c043b1e3a8bbb264fca4018fc518e179324fef
authorDmitry Popov <dp@highloadlab.com>
Thu, 29 Jul 2010 01:59:36 +0000 (29 01:59 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:43:42 +0000 (26 16:43 -0700)
tree8026b54fd48817fe06d0b5e8ba62395659b26095
parent73be303e5c91ee98bfd67a5fba755ebc29aae391
tcp: cookie transactions setsockopt memory leak

[ Upstream commit a3bdb549e30e7a263f7a589747c40e9c50110315 ]

There is a bug in do_tcp_setsockopt(net/ipv4/tcp.c),
TCP_COOKIE_TRANSACTIONS case.
In some cases (when tp->cookie_values == NULL) new tcp_cookie_values
structure can be allocated (at cvp), but not bound to
tp->cookie_values. So a memory leak occurs.

Signed-off-by: Dmitry Popov <dp@highloadlab.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/tcp.c