Unverified Commit d67a9a26 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!2334 ktask: add memory leak handling for ktask_works in ktask_init()

Merge Pull Request from: @gemini2045 
 
Hello, I am Gui-Dong Han
from the School of Cyber Science and Technology at Beihang University.
I discovered a possible bug using a program analysis tool
named `BassCheck`, developed by our team.

The pointer `ktask_works` is allocated using `kmalloc_array`,
but is not freed in the error handling code.
This can lead to a memory leak if the initialization process fails.
To address this issue,
the allocated memory for the pointer `ktask_works`
should be freed in the respective error handling code.
 
 
Link:https://gitee.com/openeuler/kernel/pulls/2334

 

Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parents 50eca1df 540cd2b7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment