]> git.baikalelectronics.ru Git - kernel.git/commit
driver: macvlan: Destroy new macvlan port if macvlan_common_newlink failed.
authorGao Feng <fgao@ikuai8.com>
Fri, 4 Nov 2016 02:28:49 +0000 (10:28 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Nov 2016 18:14:47 +0000 (13:14 -0500)
commit1d2e9c1bcaa832e434d0731476ea6aada91bba33
tree6e70de9e52fc25034e88dd6836a418e795b23ec1
parent83560e7eedbfed7450eed866a45730a224f2f480
driver: macvlan: Destroy new macvlan port if macvlan_common_newlink failed.

When there is no existing macvlan port in lowdev, one new macvlan port
would be created. But it doesn't be destoried when something failed later.
It casues some memleak.

Now add one flag to indicate if new macvlan port is created.

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