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
6905b76b
Commit
6905b76b
authored
Nov 28, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Simplify memory allocation in HTTP_InsertCustomHeader.
parent
5cf0d974
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
http.c
dlls/wininet/http.c
+1
-9
No files found.
dlls/wininet/http.c
View file @
6905b76b
...
...
@@ -6280,15 +6280,7 @@ static DWORD HTTP_InsertCustomHeader(http_request_t *request, LPHTTPHEADERW lpHd
TRACE
(
"--> %s: %s
\n
"
,
debugstr_w
(
lpHdr
->
lpszField
),
debugstr_w
(
lpHdr
->
lpszValue
));
count
=
request
->
nCustHeaders
+
1
;
if
(
count
>
1
)
{
lph
=
realloc
(
request
->
custHeaders
,
sizeof
(
HTTPHEADERW
)
*
count
);
memset
(
lph
+
request
->
nCustHeaders
,
0
,
sizeof
(
HTTPHEADERW
));
}
else
{
lph
=
calloc
(
count
,
sizeof
(
HTTPHEADERW
));
}
lph
=
realloc
(
request
->
custHeaders
,
sizeof
(
HTTPHEADERW
)
*
count
);
if
(
!
lph
)
return
ERROR_OUTOFMEMORY
;
...
...
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