subsystem: sip_svc: Initialize clients structure after allocation

Initialize client structure after memory allocation.

Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
This commit is contained in:
Mahesh Rao 2023-06-22 05:54:56 +00:00 committed by Carles Cufí
commit 97f9d3c60b

View file

@ -878,6 +878,8 @@ static int sip_svc_subsys_init(void)
return -ENOMEM; return -ENOMEM;
} }
memset(ctrl->clients, 0, ctrl->num_clients * sizeof(struct sip_svc_client));
/* Initialize request msgq */ /* Initialize request msgq */
k_msgq_init(&ctrl->req_msgq, msgq_buf, sizeof(struct sip_svc_request), k_msgq_init(&ctrl->req_msgq, msgq_buf, sizeof(struct sip_svc_request),
CONFIG_ARM_SIP_SVC_SUBSYS_MSGQ_DEPTH); CONFIG_ARM_SIP_SVC_SUBSYS_MSGQ_DEPTH);