devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=826d6f1bc29529292d236c02e444d2ecb11da9e0

commit 826d6f1bc29529292d236c02e444d2ecb11da9e0
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Wed Oct 22 09:12:29 2014 -0400

    ecore-drm: Cleanup/Unify output_free function code
    
    Summary: There is no point in having different code in each output
    free function (internal one and API exposed one), so let's unify the
    code here.
    
    @fix
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_drm/ecore_drm_output.c | 31 ++++++++++---------------------
 1 file changed, 10 insertions(+), 21 deletions(-)

diff --git a/src/lib/ecore_drm/ecore_drm_output.c 
b/src/lib/ecore_drm/ecore_drm_output.c
index 1b46e6b..af635b5 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -556,15 +556,21 @@ _ecore_drm_output_free(Ecore_Drm_Output *output)
 {
    Ecore_Drm_Output_Mode *mode;
 
+   /* check for valid output */
    if (!output) return;
 
-   eina_stringshare_del(output->make);
-   eina_stringshare_del(output->model);
-   eina_stringshare_del(output->name);
+   /* delete any added udev watch */
+   if (output->watch) eeze_udev_watch_del(output->watch);
 
+   /* free modes */
    EINA_LIST_FREE(output->modes, mode)
      free(mode);
 
+   /* free strings */
+   if (output->name) eina_stringshare_del(output->name);
+   if (output->model) eina_stringshare_del(output->model);
+   if (output->make) eina_stringshare_del(output->make);
+
    drmModeFreeCrtc(output->crtc);
 
    free(output);
@@ -777,24 +783,7 @@ ecore_drm_outputs_create(Ecore_Drm_Device *dev)
 EAPI void 
 ecore_drm_output_free(Ecore_Drm_Output *output)
 {
-   Ecore_Drm_Output_Mode *mode;
-
-   /* check for valid output */
-   if (!output) return;
-
-   /* delete any added udev watch */
-   if (output->watch) eeze_udev_watch_del(output->watch);
-
-   /* free modes */
-   EINA_LIST_FREE(output->modes, mode)
-     free(mode);
-
-   /* free strings */
-   if (output->name) eina_stringshare_del(output->name);
-   if (output->model) eina_stringshare_del(output->model);
-   if (output->make) eina_stringshare_del(output->make);
-
-   free(output);
+   _ecore_drm_output_free(output);
 }
 
 EAPI void 

-- 


Reply via email to