Searched hist:dc2f832ecb045dd43793531ae149e1767696f5ad (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/gpu/drm/amd/amdkfd/ |
H A D | kfd_process.c | diff dc2f832ecb045dd43793531ae149e1767696f5ad Sat Jun 20 04:11:52 CDT 2020 Bernard Zhao <bernard@vivo.com> drm/amd: fix potential memleak in err branch
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.
Signed-off-by: Bernard Zhao <bernard@vivo.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|