Commit b5b78a6c authored by Bernard Zhao's avatar Bernard Zhao Committed by Alex Deucher
Browse files

drm/amd: fix potential memleak in err branch

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 <>
parent fa7041d9
......@@ -428,6 +428,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