[PATCH 1/2] advapi32/tests: Fix a couple of leaks (Valgrind).
Thomas Faber
thomas.faber at reactos.org
Wed Jan 10 16:22:05 CST 2018
On 2018-01-10 22:59, Matteo Bruni wrote:
> @@ -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 );
It may be better to only do this if (!err). Otherwise you might
introduce heap corruption on Windows, since sd is uninitialized.
Best,
Thomas
More information about the wine-devel
mailing list