Commit 27998cb2 authored by Bernard Zhao's avatar Bernard Zhao Committed by Sasha Levin
Browse files

drm/amd: fix potential memleak in err branch

commit b5b78a6c


The function kobject_init_and_add alloc memory like:
->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: default avatarBernard Zhao <>
Reviewed-by: default avatarFelix Kuehling <>
Signed-off-by: default avatarFelix Kuehling <>
Signed-off-by: default avatarAlex Deucher <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 937007f0
......@@ -396,6 +396,7 @@ struct kfd_process *kfd_create_process(struct file *filep)
if (ret) {
pr_warn("Creating procfs pid directory failed");
goto out;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment