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
08603e56
Commit
08603e56
authored
Mar 24, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Fix a memory leak in insert_header (Valgrind).
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c5d733e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
request.c
dlls/winhttp/request.c
+11
-15
No files found.
dlls/winhttp/request.c
View file @
08603e56
...
...
@@ -368,25 +368,21 @@ static int get_header_index( request_t *request, LPCWSTR field, int requested_in
static
BOOL
insert_header
(
request_t
*
request
,
header_t
*
header
)
{
DWORD
count
;
DWORD
count
=
request
->
num_headers
+
1
;
header_t
*
hdrs
;
count
=
request
->
num_headers
+
1
;
if
(
count
>
1
)
if
(
request
->
headers
)
hdrs
=
heap_realloc_zero
(
request
->
headers
,
sizeof
(
header_t
)
*
count
);
else
hdrs
=
heap_alloc_zero
(
sizeof
(
header_t
)
*
count
);
if
(
hdrs
)
{
request
->
headers
=
hdrs
;
request
->
headers
[
count
-
1
].
field
=
strdupW
(
header
->
field
);
request
->
headers
[
count
-
1
].
value
=
strdupW
(
header
->
value
);
request
->
headers
[
count
-
1
].
is_request
=
header
->
is_request
;
request
->
num_headers
++
;
return
TRUE
;
}
return
FALSE
;
hdrs
=
heap_alloc_zero
(
sizeof
(
header_t
)
);
if
(
!
hdrs
)
return
FALSE
;
request
->
headers
=
hdrs
;
request
->
headers
[
count
-
1
].
field
=
strdupW
(
header
->
field
);
request
->
headers
[
count
-
1
].
value
=
strdupW
(
header
->
value
);
request
->
headers
[
count
-
1
].
is_request
=
header
->
is_request
;
request
->
num_headers
=
count
;
return
TRUE
;
}
static
BOOL
delete_header
(
request_t
*
request
,
DWORD
index
)
...
...
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