lkml.org 
[lkml]   [2020]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] drm/amd: Fix memory leak according to error branch
From
Date
> The function kobject_init_and_add alloc memory like:
> kobject_init_and_add->kobject_add_varg->kobject_set_name_vargs
> ->kvasprintf_const->kstrdup_const->kstrdup->kmalloc_track_caller
> ->kmalloc_slab, in err branch this memory not free. If use
> kmemleak, this path maybe catched.
> These changes are to add kobject_put in kobject_init_and_add
> failed branch, fix potential memleak.

> Changes since V2:
> *remove duplicate kobject_put in kfd_procfs_init.

Under which circumstances are going to improve this change description accordingly?

Would you like to add the tag “Fixes” to the commit message?

Regards,
Markus

\
 
 \ /
  Last update: 2020-06-20 14:39    [W:0.033 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site