Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c867f332
Commit
c867f332
authored
Oct 06, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Free fd entries with incorrect HANDLE value.
parent
190c67c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
file.c
dlls/msvcrt/file.c
+7
-10
No files found.
dlls/msvcrt/file.c
View file @
c867f332
...
...
@@ -797,18 +797,15 @@ int CDECL MSVCRT__close(int fd)
LOCK_FILES
();
hand
=
msvcrt_fdtoh
(
fd
);
TRACE
(
":fd (%d) handle (%p)
\n
"
,
fd
,
hand
);
if
(
hand
==
INVALID_HANDLE_VALUE
)
ret
=
-
1
;
else
if
(
!
CloseHandle
(
hand
))
{
WARN
(
":failed-last error (%d)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
if
(
!
msvcrt_is_valid_fd
(
fd
))
{
ret
=
-
1
;
}
else
{
}
else
{
msvcrt_free_fd
(
fd
);
ret
=
0
;
ret
=
CloseHandle
(
hand
)
?
0
:
-
1
;
if
(
ret
)
{
WARN
(
":failed-last error (%d)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
}
}
UNLOCK_FILES
();
TRACE
(
":ok
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment