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:
Dave Stevenson
2019-05-01 13:27:23 +01:00
committed by Dom Cobley
parent ab226d35bc
commit 902b68ed04

View File

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