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
40c66b89
Commit
40c66b89
authored
Oct 02, 2007
by
Lionel Debroux
Committed by
Alexandre Julliard
Oct 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Fix memory leaks (found by Smatch).
parent
d053049f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
security.c
dlls/advapi32/tests/security.c
+13
-2
No files found.
dlls/advapi32/tests/security.c
View file @
40c66b89
...
...
@@ -719,6 +719,7 @@ static void test_AccessCheck(void)
if
(
!
res
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
{
skip
(
"ACLs not implemented - skipping tests
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
Acl
);
return
;
}
ok
(
res
,
"InitializeAcl failed with error %d
\n
"
,
GetLastError
());
...
...
@@ -1540,6 +1541,7 @@ static void test_process_security(void)
if
(
!
res
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
{
skip
(
"ACLs not implemented - skipping tests
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
Acl
);
return
;
}
ok
(
res
,
"InitializeAcl failed with error %d
\n
"
,
GetLastError
());
...
...
@@ -1547,7 +1549,11 @@ static void test_process_security(void)
/* get owner from the token we might be running as a user not admin */
res
=
OpenProcessToken
(
GetCurrentProcess
(),
MAXIMUM_ALLOWED
,
&
token
);
ok
(
res
,
"OpenProcessToken failed with error %d
\n
"
,
GetLastError
());
if
(
!
res
)
return
;
if
(
!
res
)
{
HeapFree
(
GetProcessHeap
(),
0
,
Acl
);
return
;
}
res
=
GetTokenInformation
(
token
,
TokenOwner
,
owner
,
sizeof
(
owner
),
&
tmp
);
ok
(
res
,
"GetTokenInformation failed with error %d
\n
"
,
GetLastError
());
...
...
@@ -1557,7 +1563,11 @@ static void test_process_security(void)
UsersSid
=
((
TOKEN_PRIMARY_GROUP
*
)
group
)
->
PrimaryGroup
;
CloseHandle
(
token
);
if
(
!
res
)
return
;
if
(
!
res
)
{
HeapFree
(
GetProcessHeap
(),
0
,
Acl
);
return
;
}
res
=
AddAccessDeniedAce
(
Acl
,
ACL_REVISION
,
PROCESS_VM_READ
,
AdminSid
);
ok
(
res
,
"AddAccessDeniedAce failed with error %d
\n
"
,
GetLastError
());
...
...
@@ -2100,6 +2110,7 @@ static void test_PrivateObjectSecurity(void)
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"Expected error ERROR_INSUFFICIENT_BUFFER, got %u
\n
"
,
GetLastError
());
LocalFree
(
sec
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
}
#undef CHECK_RESULT_AND_FREE
...
...
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