summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm_launcher.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-12-09 15:12:36 -0500
committerChris Michael <cp.michael@samsung.com>2014-12-09 15:12:36 -0500
commita5654dbb247e23e54d741a801f3543613935f852 (patch)
treebe243232989353b9ea77bcbd542529655ce42afc /src/lib/ecore_drm/ecore_drm_launcher.c
parent7da19b4c21f5a4f6abcfaf334e995a5a0222340b (diff)
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 <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm_launcher.c')
-rw-r--r--src/lib/ecore_drm/ecore_drm_launcher.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_launcher.c b/src/lib/ecore_drm/ecore_drm_launcher.c
index 8aab76cd64..74ec59d21e 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)
128void 128void
129_ecore_drm_launcher_device_close(const char *device, int fd) 129_ecore_drm_launcher_device_close(const char *device, int fd)
130{ 130{
131 if (logind) 131 if ((logind) && (device))
132 return _ecore_drm_logind_device_close(device); 132 return _ecore_drm_logind_device_close(device);
133 133
134 close(fd); 134 close(fd);