From dc3da871396015507801724b7b844e5865f049d0 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 30 May 2017 15:57:07 -0400 Subject: [PATCH] ecore-drm2: Don't free output plane states if not using atomic If atomic support is not enabled (kernel or env var), then we will not be filling output plane_states, so no need to free them (if non-atomic). @fix Signed-off-by: Chris Michael --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 3173165aa5..60e4f8e7d8 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -923,14 +923,14 @@ _output_destroy(Ecore_Drm2_Device *dev, Ecore_Drm2_Output *output) } #endif - EINA_LIST_FREE(output->plane_states, pstate) - free(pstate); - - EINA_LIST_FREE(output->planes, plane) - free(plane); - if (_ecore_drm2_use_atomic) { + EINA_LIST_FREE(output->plane_states, pstate) + free(pstate); + + EINA_LIST_FREE(output->planes, plane) + free(plane); + free(output->conn_state); free(output->crtc_state); }