]> git.baikalelectronics.ru Git - kernel.git/commit
net: erspan: remove md NULL check
authorWilliam Tu <u9012063@gmail.com>
Thu, 21 Dec 2017 23:51:22 +0000 (15:51 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Dec 2017 22:30:11 +0000 (17:30 -0500)
commitb6952191f9cf80abd6dbe99d8aebee1f3d8a7c41
treedd5285ea1c135f4fea1d701dd7a486ede2d25484
parentf6f736c4f454a3e48eb1e2b5edbc601e6686d838
net: erspan: remove md NULL check

The 'md' is allocated from 'tun_dst = ip_tun_rx_dst' and
since we've checked 'tun_dst', 'md' will never be NULL.
The patch removes it at both ipv4 and ipv6 erspan.

Fixes: 796d8108bcb6 ("ip6_gre: fix potential memory leak in ip6erspan_rcv")
Fixes: b52d0d8c5794 ("ip_gre: fix potential memory leak in erspan_rcv")
Cc: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c
net/ipv6/ip6_gre.c