devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=31ac7989d4da68cbb8307bd9a6e9c37c8fc4bdee

commit 31ac7989d4da68cbb8307bd9a6e9c37c8fc4bdee
Author: Seunghun Lee <[email protected]>
Date:   Wed Dec 10 08:00:17 2014 -0500

    ecore-drm: Added cleanup data code as a error handling of connect logind.
    
    Summary: need to clean also dbus, when failed open VT as a connection 
progress of logind.
    
    @fix
    
    Reviewers: devilhorns
    
    Reviewed By: devilhorns
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D1756
---
 src/lib/ecore_drm/ecore_drm_logind.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/lib/ecore_drm/ecore_drm_logind.c 
b/src/lib/ecore_drm/ecore_drm_logind.c
index c22f113..30db412 100644
--- a/src/lib/ecore_drm/ecore_drm_logind.c
+++ b/src/lib/ecore_drm/ecore_drm_logind.c
@@ -254,18 +254,18 @@ _ecore_drm_logind_connect(Ecore_Drm_Device *dev)
 
    /* try to init dbus */
    if (!_ecore_drm_dbus_init(sid))
-     {
-        free(sid);
-        return EINA_FALSE;
-     }
+     goto dbus_err;
 
    if (!_ecore_drm_logind_vt_open(dev, NULL))
-     {
-        free(sid);
-        return EINA_FALSE;
-     }
+     goto vt_err;
 
    return EINA_TRUE;
+
+vt_err:
+   _ecore_drm_dbus_shutdown();
+dbus_err:
+   free(sid);
+   return EINA_FALSE;
 }
 
 void

-- 


Reply via email to