summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-01-22 11:31:19 +0100
committerDavid S. Miller <davem@davemloft.net>2018-01-22 15:27:10 +0100
commitb75703de16301b80f1eedecafdf37bb02c9e155f (patch)
tree834fb1ed28387d7ebb81c5f9a6a8653a6ee7f72e /drivers/net/ethernet/cavium
parentMerge branch 'mlxsw-spectrum_router-Optimize-LPM-trees' (diff)
downloadlinux-b75703de16301b80f1eedecafdf37bb02c9e155f.tar.xz
linux-b75703de16301b80f1eedecafdf37bb02c9e155f.zip
devlink: fix memory leak on 'resource'
Currently, if the call to devlink_resource_find returns null then the error exit path does not free the devlink_resource 'resource' and a memory leak occurs. Fix this by kfree'ing resource on the error exit path. Detected by CoverityScan, CID#1464184 ("Resource leak") Fixes: d9f9b9a4d05f ("devlink: Add support for resource abstraction") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium')
0 files changed, 0 insertions, 0 deletions