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 <tomasz.lauda@linux.intel.com>
This commit is contained in:
Tomasz Lauda 2020-03-16 15:48:11 +01:00 committed by Tomasz Lauda
parent df6c637e8f
commit 30e6e9eb41
1 changed files with 1 additions and 1 deletions

View File

@ -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;