summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tilcdc
diff options
context:
space:
mode:
authorBernard Zhao <bernard@vivo.com>2020-06-20 17:11:52 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-07-01 01:59:26 -0400
commitdc2f832ecb045dd43793531ae149e1767696f5ad (patch)
tree45b5267655b057b730b0335c059dc243cfb260ce /drivers/gpu/drm/tilcdc
parentf29aa08852e1953e461f2d47ab13c34e14bc08b3 (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/tilcdc')
0 files changed, 0 insertions, 0 deletions