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
0a7084f4
Commit
0a7084f4
authored
Sep 24, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Sep 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Use the wcsdup function instead of reimplementing it.
parent
f24edd9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
import.c
programs/reg/import.c
+2
-6
No files found.
programs/reg/import.c
View file @
0a7084f4
...
@@ -377,10 +377,7 @@ static LONG open_key(struct parser *parser, WCHAR *path)
...
@@ -377,10 +377,7 @@ static LONG open_key(struct parser *parser, WCHAR *path)
KEY_ALL_ACCESS
|
parser
->
sam
,
NULL
,
&
parser
->
hkey
,
NULL
);
KEY_ALL_ACCESS
|
parser
->
sam
,
NULL
,
&
parser
->
hkey
,
NULL
);
if
(
res
==
ERROR_SUCCESS
)
if
(
res
==
ERROR_SUCCESS
)
{
parser
->
key_name
=
wcsdup
(
path
);
parser
->
key_name
=
malloc
((
lstrlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
));
lstrcpyW
(
parser
->
key_name
,
path
);
}
else
else
parser
->
hkey
=
NULL
;
parser
->
hkey
=
NULL
;
...
@@ -636,8 +633,7 @@ static WCHAR *quoted_value_name_state(struct parser *parser, WCHAR *pos)
...
@@ -636,8 +633,7 @@ static WCHAR *quoted_value_name_state(struct parser *parser, WCHAR *pos)
goto
invalid
;
goto
invalid
;
/* copy the value name in case we need to parse multiple lines and the buffer is overwritten */
/* copy the value name in case we need to parse multiple lines and the buffer is overwritten */
parser
->
value_name
=
malloc
((
lstrlenW
(
val_name
)
+
1
)
*
sizeof
(
WCHAR
));
parser
->
value_name
=
wcsdup
(
val_name
);
lstrcpyW
(
parser
->
value_name
,
val_name
);
set_state
(
parser
,
DATA_START
);
set_state
(
parser
,
DATA_START
);
return
p
;
return
p
;
...
...
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