ecore-drm2: Free Output modes on destroy

When we destroy outputs, we should be freeing the Output's Modes also
as that was previously allocated memory.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2016-10-11 11:30:13 -04:00
parent fb112b8fab
commit aba152a8be
1 changed files with 9 additions and 0 deletions

View File

@ -885,6 +885,15 @@ _cb_output_event(const char *device EINA_UNUSED, Eeze_Udev_Event event EINA_UNUS
static void
_output_destroy(Ecore_Drm2_Device *dev, Ecore_Drm2_Output *output)
{
Ecore_Drm2_Output_Mode *mode;
EINA_LIST_FREE(output->modes, mode)
{
if (mode->id)
drmModeDestroyPropertyBlob(output->fd, mode->id);
free(mode);
}
dev->alloc.crtc &= ~(1 << output->crtc_id);
dev->alloc.conn &= ~(1 << output->conn_id);