e_start_main: Close fd only if we actually succeeded opening it.

In the error case fd would be -1 here. Closing needs to be handled in the
cases where fd != -1.

CID: 1256492
This commit is contained in:
Stefan Schmidt 2014-12-02 10:50:27 +01:00
parent c7386d61c9
commit 9336d7c372
1 changed files with 1 additions and 1 deletions

View File

@ -413,8 +413,8 @@ _e_ptrace_kernel_check()
{
char c;
ret = (read(fd, &c, sizeof (c)) == sizeof (c) && c != '0');
close(fd);
}
close(fd);
return ret;
#else
return EINA_FALSE;