summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm_tty.c
diff options
context:
space:
mode:
authorSeunghun Lee <shiin.lee@samsung.com>2014-11-26 09:01:47 -0500
committerChris Michael <cp.michael@samsung.com>2014-11-26 09:02:02 -0500
commit2f47d48d76af512a7a4bdca690648aa6c8f117f8 (patch)
treeb29e6885c29be9963bf389317f3ac14532bcc6b9 /src/lib/ecore_drm/ecore_drm_tty.c
parentfe4bb3901ceb1b2c45c841e4ebf26bf1027a6196 (diff)
ecore-drm: close fd handle if _ecore_drm_tty_setup() is failed in ecore_drm_tty_open().
Summary: added code to close fd handle and clear data. @fix Test Plan: N/A Reviewers: gwanglim, devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1701
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm_tty.c')
-rw-r--r--src/lib/ecore_drm/ecore_drm_tty.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_tty.c b/src/lib/ecore_drm/ecore_drm_tty.c
index ad6184b492..5f5c4c5391 100644
--- a/src/lib/ecore_drm/ecore_drm_tty.c
+++ b/src/lib/ecore_drm/ecore_drm_tty.c
@@ -227,7 +227,11 @@ ecore_drm_tty_open(Ecore_Drm_Device *dev, const char *name)
227 227
228 /* FIXME */ 228 /* FIXME */
229 if (!_ecore_drm_tty_setup(dev)) 229 if (!_ecore_drm_tty_setup(dev))
230 return EINA_FALSE; 230 {
231 close(dev->tty.fd);
232 dev->tty.fd = -1;
233 return EINA_FALSE;
234 }
231 235
232 /* setup handler for signals */ 236 /* setup handler for signals */
233 dev->tty.event_hdlr = 237 dev->tty.event_hdlr =