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
2f4968b5
Commit
2f4968b5
authored
Jan 13, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 13, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Fixed memory leak in tests (valgrind).
parent
0662555a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
http.c
dlls/wininet/tests/http.c
+17
-0
No files found.
dlls/wininet/tests/http.c
View file @
2f4968b5
...
...
@@ -2592,6 +2592,15 @@ static void test_http_connection(void)
CloseHandle
(
hThread
);
}
static
void
release_cert_info
(
INTERNET_CERTIFICATE_INFOA
*
info
)
{
LocalFree
(
info
->
lpszSubjectInfo
);
LocalFree
(
info
->
lpszIssuerInfo
);
LocalFree
(
info
->
lpszProtocolName
);
LocalFree
(
info
->
lpszSignatureAlgName
);
LocalFree
(
info
->
lpszEncryptionAlgName
);
}
static
void
test_secure_connection
(
void
)
{
static
const
WCHAR
gizmo5
[]
=
{
'G'
,
'i'
,
'z'
,
'm'
,
'o'
,
'5'
,
0
};
...
...
@@ -2627,6 +2636,7 @@ static void test_secure_connection(void)
ret
=
InternetQueryOptionA
(
req
,
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
,
NULL
,
&
size
);
ok
(
ret
||
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"InternetQueryOption failed: %d
\n
"
,
GetLastError
());
ok
(
size
==
sizeof
(
INTERNET_CERTIFICATE_INFOA
),
"size = %d
\n
"
,
size
);
certificate_structA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
ret
=
InternetQueryOption
(
req
,
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
,
certificate_structA
,
&
size
);
...
...
@@ -2646,6 +2656,7 @@ static void test_secure_connection(void)
ok
(
!
certificate_structA
->
lpszProtocolName
,
"unexpected protocol name
\n
"
);
ok
(
certificate_structA
->
dwKeySize
,
"expected a non-zero key size
\n
"
);
release_cert_info
(
certificate_structA
);
}
HeapFree
(
GetProcessHeap
(),
0
,
certificate_structA
);
...
...
@@ -2656,6 +2667,7 @@ static void test_secure_connection(void)
ret
=
InternetQueryOptionW
(
req
,
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
,
NULL
,
&
size
);
ok
(
ret
||
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"InternetQueryOption failed: %d
\n
"
,
GetLastError
());
ok
(
size
==
sizeof
(
INTERNET_CERTIFICATE_INFOW
),
"size = %d
\n
"
,
size
);
certificate_structW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
ret
=
InternetQueryOption
(
req
,
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
,
certificate_structW
,
&
size
);
...
...
@@ -2676,6 +2688,7 @@ static void test_secure_connection(void)
ok
(
!
certificate_structA
->
lpszProtocolName
,
"unexpected protocol name
\n
"
);
ok
(
certificate_structA
->
dwKeySize
,
"expected a non-zero key size
\n
"
);
release_cert_info
(
certificate_structA
);
}
HeapFree
(
GetProcessHeap
(),
0
,
certificate_structW
);
...
...
@@ -2707,6 +2720,7 @@ static void test_secure_connection(void)
ret
=
InternetQueryOptionA
(
req
,
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
,
NULL
,
&
size
);
ok
(
ret
||
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"InternetQueryOption failed: %d
\n
"
,
GetLastError
());
ok
(
size
==
sizeof
(
INTERNET_CERTIFICATE_INFOA
),
"size = %d
\n
"
,
size
);
certificate_structA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
ret
=
InternetQueryOptionW
(
req
,
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
,
certificate_structA
,
&
size
);
...
...
@@ -2726,6 +2740,7 @@ static void test_secure_connection(void)
ok
(
!
certificate_structA
->
lpszProtocolName
,
"unexpected protocol name
\n
"
);
ok
(
certificate_structA
->
dwKeySize
,
"expected a non-zero key size
\n
"
);
release_cert_info
(
certificate_structA
);
}
HeapFree
(
GetProcessHeap
(),
0
,
certificate_structA
);
...
...
@@ -2736,6 +2751,7 @@ static void test_secure_connection(void)
ret
=
InternetQueryOptionW
(
req
,
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
,
NULL
,
&
size
);
ok
(
ret
||
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"InternetQueryOption failed: %d
\n
"
,
GetLastError
());
ok
(
size
==
sizeof
(
INTERNET_CERTIFICATE_INFOW
),
"size = %d
\n
"
,
size
);
certificate_structW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
ret
=
InternetQueryOptionW
(
req
,
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
,
certificate_structW
,
&
size
);
...
...
@@ -2756,6 +2772,7 @@ static void test_secure_connection(void)
ok
(
!
certificate_structA
->
lpszProtocolName
,
"unexpected protocol name
\n
"
);
ok
(
certificate_structA
->
dwKeySize
,
"expected a non-zero key size
\n
"
);
release_cert_info
(
certificate_structA
);
}
HeapFree
(
GetProcessHeap
(),
0
,
certificate_structW
);
...
...
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