]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: Fix memleak in mv88e6xxx_region_atu_snapshot
authorzhangxiaoxu <zhangxiaoxu5@huawei.com>
Mon, 9 Nov 2020 14:44:16 +0000 (09:44 -0500)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Nov 2020 01:49:06 +0000 (17:49 -0800)
commitb048d97be6a0e2e44af8f466aaa969bb7313a34c
treea5811e5c09c9e407aace0c22fd0312902290026e
parentcb305c9dd8ee3bcb74a1aca6e84b20eba15a6a0e
net: dsa: mv88e6xxx: Fix memleak in mv88e6xxx_region_atu_snapshot

When mv88e6xxx_fid_map return error, we lost free the table.

Fix it.

Fixes: 65c424bf6a37 ("net: dsa: mv88e6xxx: Add devlink regions")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhangxiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20201109144416.1540867-1-zhangxiaoxu5@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/devlink.c