From: Chris Michael Date: Mon, 27 Mar 2017 15:53:54 +0000 (-0400) Subject: ecore-drm2: Cleanup list of output planes on output_destroy X-Git-Tag: upstream/1.20.0~1464^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1525ecf35f25019268ee0a2d87567b6846be194;p=platform%2Fupstream%2Fefl.git ecore-drm2: Cleanup list of output planes on output_destroy Small patch to make sure we free memory previously allocated for hardware planes when we destroy an output Signed-off-by: Chris Michael --- diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 3235015..cc4f148 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -906,11 +906,15 @@ _output_destroy(Ecore_Drm2_Device *dev, Ecore_Drm2_Output *output) #ifdef HAVE_ATOMIC_DRM if (_ecore_drm2_use_atomic) { + Ecore_Drm2_Plane *plane; Ecore_Drm2_Plane_State *pstate; 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); } diff --git a/src/lib/ecore_drm2/ecore_drm2_private.h b/src/lib/ecore_drm2/ecore_drm2_private.h index 0c5937d..3a9f15a 100644 --- a/src/lib/ecore_drm2/ecore_drm2_private.h +++ b/src/lib/ecore_drm2/ecore_drm2_private.h @@ -711,7 +711,7 @@ struct _Ecore_Drm2_Plane Ecore_Drm2_Fb *fb; // current fbo Ecore_Drm2_Fb *qfb; // queued fbo # ifdef HAVE_ATOMIC_DRM - Ecore_Drm2_Plane_State *plane_state; + Ecore_Drm2_Plane_State *state; # endif }; @@ -775,6 +775,7 @@ struct _Ecore_Drm2_Output Ecore_Drm2_Crtc_State *crtc_state; Ecore_Drm2_Connector_State *conn_state; Eina_List *plane_states; + Eina_List *planes; # endif Eina_Bool connected : 1;