mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
staging: mmal-vchiq: Free the event context for control ports
vchiq_mmal_component_init calls init_event_context for the control port, but vchiq_mmal_component_finalise didn't free it, causing a memory leak.. Add the free call. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
This commit is contained in:
committed by
Dom Cobley
parent
ab226d35bc
commit
902b68ed04
@@ -1901,6 +1901,8 @@ int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance,
|
|||||||
for (idx = 0; idx < component->clocks; idx++)
|
for (idx = 0; idx < component->clocks; idx++)
|
||||||
free_event_context(&component->clock[idx]);
|
free_event_context(&component->clock[idx]);
|
||||||
|
|
||||||
|
free_event_context(&component->control);
|
||||||
|
|
||||||
mutex_unlock(&instance->vchiq_mutex);
|
mutex_unlock(&instance->vchiq_mutex);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user