[PATCH 1/2] advapi32/tests: Fix a couple of leaks (Valgrind).

Matteo Bruni mbruni at codeweavers.com
Wed Jan 10 15:59:02 CST 2018


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
I don't know that we care a lot about the leak fixed in the first
hunk. If we go with it, the LocalFree() ideally should be removed when
we'll get rid of the todo_wine.

For bug 43310.

 dlls/advapi32/tests/security.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 51dcf90851..769328be81 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -6570,6 +6570,7 @@ static void test_system_security_access(void)
     /* privilege is checked on access */
     err = GetSecurityInfo( hkey, SE_REGISTRY_KEY, SACL_SECURITY_INFORMATION, NULL, NULL, NULL, &sacl, &sd );
     todo_wine ok( err == ERROR_PRIVILEGE_NOT_HELD, "got %u\n", err );
+    LocalFree( sd );
 
     priv.PrivilegeCount = 1;
     priv.Privileges[0].Luid = luid;
@@ -7082,6 +7083,7 @@ static void test_token_security_descriptor(void)
     CloseHandle(info.hThread);
 
     LocalFree(acl_child);
+    HeapFree(GetProcessHeap(), 0, sd2);
     LocalFree(psid);
 
     CloseHandle(token3);
-- 
2.13.6




More information about the wine-devel mailing list