[PATCH 1/2] advapi32/tests: Fix a couple of leaks (Valgrind).
Matteo Bruni
matteo.mystral at gmail.com
Wed Jan 10 16:37:00 CST 2018
2018-01-10 23:22 GMT+01:00 Thomas Faber <thomas.faber at reactos.org>:
> 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.
Eh, good point. I'll resend with that change.
More information about the wine-devel
mailing list