From 30e6e9eb41b99fc50b3c18467a90494878c4d277 Mon Sep 17 00:00:00 2001 From: Tomasz Lauda Date: Mon, 16 Mar 2020 15:48:11 +0100 Subject: [PATCH] ipc: allocate correct msg size Msg size should use its own structure's size. Only payload should be allocated using passed one. Signed-off-by: Tomasz Lauda --- src/include/sof/drivers/ipc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/sof/drivers/ipc.h b/src/include/sof/drivers/ipc.h index 0d7bf3ec5..67d2479e0 100644 --- a/src/include/sof/drivers/ipc.h +++ b/src/include/sof/drivers/ipc.h @@ -158,7 +158,7 @@ static inline struct ipc_msg *ipc_msg_init(uint32_t header, uint32_t size) struct ipc_msg *msg; msg = rzalloc(SOF_MEM_ZONE_RUNTIME, SOF_MEM_FLAG_SHARED, - SOF_MEM_CAPS_RAM, size); + SOF_MEM_CAPS_RAM, sizeof(*msg)); if (!msg) return NULL;