mirror of https://github.com/thesofproject/sof.git
tools: plugin: ctl: Fix reply_data_size calculation
Use the size of struct ipc4_module_large_config_reply instead of the size of the pointer. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
parent
0ae6a330aa
commit
5416adbc23
|
@ -229,7 +229,7 @@ static int plug_ctl_read_integer(snd_ctl_ext_t *ext, snd_ctl_ext_key_t key, long
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
/* reply contains both the requested data and the reply status */
|
/* reply contains both the requested data and the reply status */
|
||||||
reply_data_size = sizeof(reply) + mixer_ctl->num_channels * sizeof(*volume);
|
reply_data_size = sizeof(*reply) + mixer_ctl->num_channels * sizeof(*volume);
|
||||||
reply_data = calloc(reply_data_size, 1);
|
reply_data = calloc(reply_data_size, 1);
|
||||||
if (!reply_data_size) {
|
if (!reply_data_size) {
|
||||||
free(msg);
|
free(msg);
|
||||||
|
|
Loading…
Reference in New Issue