projects
/
platform
/
upstream
/
enlightenment.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7386d6
)
e_start_main: Close fd only if we actually succeeded opening it.
author
Stefan Schmidt
<s.schmidt@samsung.com>
Tue, 2 Dec 2014 09:50:27 +0000
(10:50 +0100)
committer
Stefan Schmidt
<s.schmidt@samsung.com>
Tue, 2 Dec 2014 09:50:27 +0000
(10:50 +0100)
In the error case fd would be -1 here. Closing needs to be handled in the
cases where fd != -1.
CID: 1256492
src/bin/e_start_main.c
patch
|
blob
|
history
diff --git
a/src/bin/e_start_main.c
b/src/bin/e_start_main.c
index
ba6f30a
..
e52ad51
100644
(file)
--- a/
src/bin/e_start_main.c
+++ b/
src/bin/e_start_main.c
@@
-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;