[lkml]   [2018]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH][next] devlink: fix memory leak on 'resource'
Mon, Jan 22, 2018 at 11:31:19AM CET, wrote:
>From: Colin Ian King <>
>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 <>

Acked-by: Jiri Pirko <>


 \ /
  Last update: 2018-01-22 11:34    [W:0.032 / U:20.076 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site