OSDN Git Service
(root)
/
android-x86
/
external-swiftshader.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75a6185
)
Fix file descriptor leak.
author
Nicolas Capens
<capn@google.com>
Thu, 20 Jul 2017 13:53:31 +0000
(09:53 -0400)
committer
Nicolas Capens
<nicolascapens@google.com>
Thu, 20 Jul 2017 15:37:03 +0000
(15:37 +0000)
Change-Id: Ie02591ba84ba8a4b204a2cb05179718e397e5c21
Reviewed-on: https://swiftshader-review.googlesource.com/10768
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/OpenGL/libEGL/Display.cpp
patch
|
blob
|
history
diff --git
a/src/OpenGL/libEGL/Display.cpp
b/src/OpenGL/libEGL/Display.cpp
index
b08fa65
..
0ae67bd
100644
(file)
--- a/
src/OpenGL/libEGL/Display.cpp
+++ b/
src/OpenGL/libEGL/Display.cpp
@@
-676,7
+676,10
@@
sw::Format Display::getDisplayFormat() const
if(fd != -1)
{
struct fb_var_screeninfo info;
- if(ioctl(fd, FBIOGET_VSCREENINFO, &info) >= 0)
+ int io = ioctl(fd, FBIOGET_VSCREENINFO, &info);
+ close(fd);
+
+ if(io >= 0)
{
switch(info.bits_per_pixel)
{
@@
-716,8
+719,6
@@
sw::Format Display::getDisplayFormat() const
UNIMPLEMENTED();
}
}
-
- close(fd);
}
}