
From: Chenghai Huang <huangchenghai2@huawei.com> The resp_msg in wd_comp_poll_ctx is used before being initialized. The null pointer check in recv function is invalid. As a result, the memory is empty. Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Qi Tao <taoqi10@huawei.com> --- wd_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wd_comp.c b/wd_comp.c index e7246740..02863df6 100644 --- a/wd_comp.c +++ b/wd_comp.c @@ -356,7 +356,7 @@ int wd_comp_poll_ctx(__u32 idx, __u32 expt, __u32 *count) { struct wd_ctx_config_internal *config = &wd_comp_setting.config; struct wd_ctx_internal *ctx; - struct wd_comp_msg resp_msg; + struct wd_comp_msg resp_msg = {0}; struct wd_comp_msg *msg; struct wd_comp_req *req; __u64 recv_count = 0; -- 2.33.0