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
This commit is contained in:
Seunghun Lee 2014-11-26 09:01:47 -05:00 committed by Chris Michael
parent fe4bb3901c
commit 2f47d48d76
1 changed files with 5 additions and 1 deletions

View File

@ -227,7 +227,11 @@ ecore_drm_tty_open(Ecore_Drm_Device *dev, const char *name)
/* FIXME */
if (!_ecore_drm_tty_setup(dev))
return EINA_FALSE;
{
close(dev->tty.fd);
dev->tty.fd = -1;
return EINA_FALSE;
}
/* setup handler for signals */
dev->tty.event_hdlr =