l2tp: fix memory allocation
authorJiri Pirko <jpirko@redhat.com>
Fri, 23 Apr 2010 00:53:39 +0000 (00:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Apr 2010 23:37:32 +0000 (16:37 -0700)
commite773aaff8295e7f3428d9cf6f8a476a33de00716
treecdfe16f60d218a7e0ffb4dddd3ff1428703e4190
parent3b51cc996e81d8a113416d8094fa4a88f8360a51
l2tp: fix memory allocation

Since .size is set properly in "struct pernet_operations l2tp_net_ops",
allocating space for "struct l2tp_net" by hand is not correct, even causes
memory leakage.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_core.c