devilhorns pushed a commit to branch master.

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

commit a5654dbb247e23e54d741a801f3543613935f852
Author: Chris Michael <[email protected]>
Date:   Tue Dec 9 15:12:36 2014 -0500

    ecore-drm: Fix ecore_drm_launcher_device_close to not cause segfaults
    
    Summary: We can only call _ecore_drm_logind_device_close if we have an
    actual device string. It is possible that this Could get called with
    NULL, and thus cause a crash.
    
    @fix
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_drm/ecore_drm_launcher.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_drm/ecore_drm_launcher.c 
b/src/lib/ecore_drm/ecore_drm_launcher.c
index 8aab76c..74ec59d 100644
--- a/src/lib/ecore_drm/ecore_drm_launcher.c
+++ b/src/lib/ecore_drm/ecore_drm_launcher.c
@@ -128,7 +128,7 @@ _ecore_drm_launcher_device_open_no_pending(const char 
*device, int flags)
 void
 _ecore_drm_launcher_device_close(const char *device, int fd)
 {
-   if (logind)
+   if ((logind) && (device))
      return _ecore_drm_logind_device_close(device);
 
    close(fd);

-- 


Reply via email to