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
810bde3b
Commit
810bde3b
authored
Sep 07, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Sep 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extrac32: Use CRT allocation functions.
parent
6db69d02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
extrac32.c
programs/extrac32/extrac32.c
+5
-7
No files found.
programs/extrac32/extrac32.c
View file @
810bde3b
...
@@ -136,13 +136,12 @@ static LPWSTR *get_extrac_args(LPWSTR cmdline, int *pargc)
...
@@ -136,13 +136,12 @@ static LPWSTR *get_extrac_args(LPWSTR cmdline, int *pargc)
BOOL
new_arg
;
BOOL
new_arg
;
WINE_TRACE
(
"cmdline: %s
\n
"
,
wine_dbgstr_w
(
cmdline
));
WINE_TRACE
(
"cmdline: %s
\n
"
,
wine_dbgstr_w
(
cmdline
));
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
cmdline
)
+
1
)
*
sizeof
(
WCHAR
)
);
str
=
wcsdup
(
cmdline
);
if
(
!
str
)
return
NULL
;
if
(
!
str
)
return
NULL
;
lstrcpyW
(
str
,
cmdline
);
argv
=
malloc
((
max_argc
+
1
)
*
sizeof
(
WCHAR
*
));
argv
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
max_argc
+
1
)
*
sizeof
(
LPWSTR
));
if
(
!
argv
)
if
(
!
argv
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
str
);
free
(
str
);
return
NULL
;
return
NULL
;
}
}
...
@@ -192,11 +191,10 @@ static LPWSTR *get_extrac_args(LPWSTR cmdline, int *pargc)
...
@@ -192,11 +191,10 @@ static LPWSTR *get_extrac_args(LPWSTR cmdline, int *pargc)
/* Realloc argv here because there always should be
/* Realloc argv here because there always should be
at least one reserved cell for terminating NULL */
at least one reserved cell for terminating NULL */
max_argc
*=
2
;
max_argc
*=
2
;
argv
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
argv
,
argv
=
realloc
(
argv
,
(
max_argc
+
1
)
*
sizeof
(
WCHAR
*
));
(
max_argc
+
1
)
*
sizeof
(
LPWSTR
));
if
(
!
argv
)
if
(
!
argv
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
str
);
free
(
str
);
return
NULL
;
return
NULL
;
}
}
}
}
...
...
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