vti: remove duplicated code to fix a memory leak
authorCong Wang <amwang@redhat.com>
Sat, 29 Jun 2013 05:00:57 +0000 (13:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jul 2013 23:29:48 +0000 (16:29 -0700)
commitda04e7df0494a9a6ccfe2aada8a262e38c284914
tree1a2de4bbc378c993d01adfb1b6ba97084332f1cb
parent3d3fa8bca30d8fd9cf5b95bd3eb9d7e2a50dec1c
vti: remove duplicated code to fix a memory leak

[ Upstream commit ab6c7a0a43c2eaafa57583822b619b22637b49c7 ]

vti module allocates dev->tstats twice: in vti_fb_tunnel_init()
and in vti_tunnel_init(), this lead to a memory leak of
dev->tstats.

Just remove the duplicated operations in vti_fb_tunnel_init().

(candidate for -stable)

Signed-off-by: Cong Wang <amwang@redhat.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Saurabh Mohan <saurabh.mohan@vyatta.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_vti.c