Messages in this thread | | | Date | Mon, 22 Jan 2018 11:34:12 +0100 | From | Jiri Pirko <> | Subject | Re: [PATCH][next] devlink: fix memory leak on 'resource' |
| |
Mon, Jan 22, 2018 at 11:31:19AM CET, colin.king@canonical.com wrote: >From: Colin Ian King <colin.king@canonical.com> > >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>
Thanks.
| |