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
92286a52
Commit
92286a52
authored
May 07, 2015
by
Marcus Meissner
Committed by
Alexandre Julliard
May 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Close filehandle on one exit branch (Coverity).
parent
aa59e674
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
source.c
programs/winedbg/source.c
+4
-1
No files found.
programs/winedbg/source.c
View file @
92286a52
...
...
@@ -87,7 +87,10 @@ static void* source_map_file(const char* name, HANDLE* hMap, unsigned* size)
hFile
=
CreateFileA
(
name
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
return
(
void
*
)
-
1
;
if
(
size
!=
NULL
&&
(
*
size
=
GetFileSize
(
hFile
,
NULL
))
==
-
1
)
return
(
void
*
)
-
1
;
if
(
size
!=
NULL
&&
(
*
size
=
GetFileSize
(
hFile
,
NULL
))
==
INVALID_FILE_SIZE
)
{
CloseHandle
(
hFile
);
return
(
void
*
)
-
1
;
}
*
hMap
=
CreateFileMappingW
(
hFile
,
NULL
,
PAGE_READONLY
,
0
,
0
,
NULL
);
CloseHandle
(
hFile
);
if
(
!*
hMap
)
return
(
void
*
)
-
1
;
...
...
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