]> bbs.cooldavid.org Git - net-next-2.6.git/commit - net/ipv4/tcp.c
tcp: cookie transactions setsockopt memory leak
authorDmitry Popov <dp@highloadlab.com>
Thu, 29 Jul 2010 01:59:36 +0000 (01:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 31 Jul 2010 06:04:07 +0000 (23:04 -0700)
commita3bdb549e30e7a263f7a589747c40e9c50110315
treeac14f82ebe454fdbc00c3f1298a293e03e1f1592
parenteeaf61d8891f9c9ed12c1a667e72bf83f0857954
tcp: cookie transactions setsockopt memory leak

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>
net/ipv4/tcp.c