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
d56217e9
Commit
d56217e9
authored
Jan 03, 2008
by
Lance Jackson
Committed by
Alexandre Julliard
Jan 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Fix some unclosed file and registry handles.
parent
2b1e487d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
batch.c
programs/cmd/batch.c
+1
-3
builtins.c
programs/cmd/builtins.c
+1
-1
wcmdmain.c
programs/cmd/wcmdmain.c
+2
-0
No files found.
programs/cmd/batch.c
View file @
d56217e9
...
...
@@ -70,9 +70,7 @@ void WCMD_batch (WCHAR *file, WCHAR *command, int called, WCHAR *startLabel, HAN
strcpyW
(
string
,
file
);
CharLower
(
string
);
if
(
strstrW
(
string
,
extension_exe
)
==
NULL
)
strcatW
(
string
,
extension_exe
);
h
=
CreateFile
(
string
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
h
!=
INVALID_HANDLE_VALUE
)
{
if
(
GetFileAttributes
(
string
)
!=
INVALID_FILE_ATTRIBUTES
)
{
WCMD_run_program
(
command
,
0
);
}
else
{
SetLastError
(
ERROR_FILE_NOT_FOUND
);
...
...
programs/cmd/builtins.c
View file @
d56217e9
...
...
@@ -2598,11 +2598,11 @@ void WCMD_assoc (WCHAR *command, BOOL assoc) {
WCMD_output_asis
(
keyValue
);
}
WCMD_output_asis
(
newline
);
RegCloseKey
(
readKey
);
}
}
}
}
RegCloseKey
(
readKey
);
}
else
{
...
...
programs/cmd/wcmdmain.c
View file @
d56217e9
...
...
@@ -377,6 +377,7 @@ int wmain (int argc, WCHAR *argvW[])
value
=
strtoulW
(
strvalue
,
NULL
,
10
);
}
}
RegCloseKey
(
key
);
}
if
(
value
==
0
&&
RegOpenKeyEx
(
HKEY_LOCAL_MACHINE
,
regKeyW
,
...
...
@@ -397,6 +398,7 @@ int wmain (int argc, WCHAR *argvW[])
value
=
strtoulW
(
strvalue
,
NULL
,
10
);
}
}
RegCloseKey
(
key
);
}
/* If one found, set the screen to that colour */
...
...
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