driver: ipvlan: Fix one possible memleak in ipvlan_link_new
authorGao Feng <fgao@ikuai8.com>
Thu, 24 Nov 2016 15:39:59 +0000 (23:39 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Nov 2016 00:58:04 +0000 (19:58 -0500)
commit147fd2874d8a8ba69970f0069d67ac341bf0bb09
tree0d0d55274d2a959655b004d15ac5d39bbf0de179
parentd8e435f3ab6fea2ea324dce72b51dd7761747523
driver: ipvlan: Fix one possible memleak in ipvlan_link_new

When ipvlan_link_new fails and creates one ipvlan port, it does not
destroy the ipvlan port created. It causes mem leak and the physical
device contains invalid ipvlan data.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_main.c