mirror of
https://github.com/raspberrypi/userland.git
synced 2025-12-06 04:49:12 +00:00
mmal_wrapper: Fix a short allocation for pools and queues (#426)
mmal_component_wrapper: Fix a short allocation for pools and queues
This commit is contained in:
@@ -151,7 +151,7 @@ MMAL_STATUS_T mmal_wrapper_create(MMAL_WRAPPER_T **ctx, const char *name)
|
||||
if (status != MMAL_SUCCESS)
|
||||
return status;
|
||||
|
||||
extra_size = (component->input_num + component->output_num) * 2;
|
||||
extra_size = (component->input_num * sizeof(MMAL_POOL_T*)) + (component->output_num * (sizeof(MMAL_POOL_T*) + sizeof(MMAL_QUEUE_T*)));
|
||||
private = vcos_calloc(1, sizeof(*private) + extra_size, "mmal wrapper");
|
||||
if (!private)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user