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
c54772c1
Commit
c54772c1
authored
Jul 29, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Fix some valgrind warnings.
parent
48ccf4f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
request.c
dlls/winhttp/request.c
+3
-2
winhttp.c
dlls/winhttp/tests/winhttp.c
+1
-0
No files found.
dlls/winhttp/request.c
View file @
c54772c1
...
@@ -2446,7 +2446,6 @@ static HRESULT WINAPI winhttp_request_Open(
...
@@ -2446,7 +2446,6 @@ static HRESULT WINAPI winhttp_request_Open(
debugstr_variant
(
&
async
));
debugstr_variant
(
&
async
));
if
(
!
method
||
!
url
)
return
E_INVALIDARG
;
if
(
!
method
||
!
url
)
return
E_INVALIDARG
;
if
(
!
(
request
->
verb
=
strdupW
(
method
)))
return
E_OUTOFMEMORY
;
memset
(
&
uc
,
0
,
sizeof
(
uc
)
);
memset
(
&
uc
,
0
,
sizeof
(
uc
)
);
uc
.
dwStructSize
=
sizeof
(
uc
);
uc
.
dwStructSize
=
sizeof
(
uc
);
...
@@ -2455,6 +2454,7 @@ static HRESULT WINAPI winhttp_request_Open(
...
@@ -2455,6 +2454,7 @@ static HRESULT WINAPI winhttp_request_Open(
uc
.
dwUrlPathLength
=
~
0u
;
uc
.
dwUrlPathLength
=
~
0u
;
uc
.
dwExtraInfoLength
=
~
0u
;
uc
.
dwExtraInfoLength
=
~
0u
;
if
(
!
WinHttpCrackUrl
(
url
,
0
,
0
,
&
uc
))
return
HRESULT_FROM_WIN32
(
get_last_error
()
);
if
(
!
WinHttpCrackUrl
(
url
,
0
,
0
,
&
uc
))
return
HRESULT_FROM_WIN32
(
get_last_error
()
);
if
(
!
(
request
->
verb
=
strdupW
(
method
)))
return
E_OUTOFMEMORY
;
if
(
!
(
hostname
=
heap_alloc
(
(
uc
.
dwHostNameLength
+
1
)
*
sizeof
(
WCHAR
)
)))
return
E_OUTOFMEMORY
;
if
(
!
(
hostname
=
heap_alloc
(
(
uc
.
dwHostNameLength
+
1
)
*
sizeof
(
WCHAR
)
)))
return
E_OUTOFMEMORY
;
memcpy
(
hostname
,
uc
.
lpszHostName
,
uc
.
dwHostNameLength
*
sizeof
(
WCHAR
)
);
memcpy
(
hostname
,
uc
.
lpszHostName
,
uc
.
dwHostNameLength
*
sizeof
(
WCHAR
)
);
...
@@ -2541,7 +2541,7 @@ static HRESULT WINAPI winhttp_request_SetRequestHeader(
...
@@ -2541,7 +2541,7 @@ static HRESULT WINAPI winhttp_request_SetRequestHeader(
}
}
len
=
strlenW
(
header
)
+
4
;
len
=
strlenW
(
header
)
+
4
;
if
(
value
)
len
+=
strlenW
(
value
);
if
(
value
)
len
+=
strlenW
(
value
);
if
(
!
(
str
=
heap_alloc
(
len
*
sizeof
(
WCHAR
)
)))
return
E_OUTOFMEMORY
;
if
(
!
(
str
=
heap_alloc
(
(
len
+
1
)
*
sizeof
(
WCHAR
)
)))
return
E_OUTOFMEMORY
;
sprintfW
(
str
,
fmtW
,
header
,
value
?
value
:
emptyW
);
sprintfW
(
str
,
fmtW
,
header
,
value
?
value
:
emptyW
);
ret
=
WinHttpAddRequestHeaders
(
request
->
hrequest
,
str
,
len
,
WINHTTP_ADDREQ_FLAG_REPLACE
);
ret
=
WinHttpAddRequestHeaders
(
request
->
hrequest
,
str
,
len
,
WINHTTP_ADDREQ_FLAG_REPLACE
);
...
@@ -2795,6 +2795,7 @@ static DWORD request_read_body( struct winhttp_request *request, DWORD timeout )
...
@@ -2795,6 +2795,7 @@ static DWORD request_read_body( struct winhttp_request *request, DWORD timeout )
request
->
state
=
REQUEST_STATE_RESPONSE_RECEIVED
;
request
->
state
=
REQUEST_STATE_RESPONSE_RECEIVED
;
if
(
!
(
request
->
buffer
=
heap_alloc
(
buflen
)))
return
E_OUTOFMEMORY
;
if
(
!
(
request
->
buffer
=
heap_alloc
(
buflen
)))
return
E_OUTOFMEMORY
;
request
->
buffer
[
0
]
=
0
;
size
=
total_bytes_read
=
0
;
size
=
total_bytes_read
=
0
;
do
do
{
{
...
...
dlls/winhttp/tests/winhttp.c
View file @
c54772c1
...
@@ -2473,6 +2473,7 @@ static void test_IWinHttpRequest(void)
...
@@ -2473,6 +2473,7 @@ static void test_IWinHttpRequest(void)
SysFreeString
(
url
);
SysFreeString
(
url
);
SysFreeString
(
username
);
SysFreeString
(
username
);
SysFreeString
(
password
);
SysFreeString
(
password
);
SysFreeString
(
connection
);
SysFreeString
(
date
);
SysFreeString
(
date
);
SysFreeString
(
today
);
SysFreeString
(
today
);
VariantClear
(
&
proxy_server
);
VariantClear
(
&
proxy_server
);
...
...
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