From: Sven Baars sbaars@codeweavers.com
--- dlls/ntdll/tests/directory.c | 1 + dlls/ntdll/tests/reg.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c index 40cd993e92c..526bd0c0c69 100644 --- a/dlls/ntdll/tests/directory.c +++ b/dlls/ntdll/tests/directory.c @@ -1182,6 +1182,7 @@ static void test_NtQueryDirectoryFile_change_mask(void)
done: tear_down_mask_test(testdir); + pRtlFreeUnicodeString(&ntdirname); pNtClose(&dirh); }
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 2b03be04416..952db9f594b 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -440,6 +440,7 @@ static void test_NtCreateKey(void) pRtlCreateUnicodeStringFromAsciiz( &str, "test_subkey\" ); status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 ); ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status ); + pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "test_subkey\" ); status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 ); @@ -451,6 +452,7 @@ static void test_NtCreateKey(void) pRtlCreateUnicodeStringFromAsciiz( &str, "test_subkey2\\" ); status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 ); ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status ); + pRtlFreeUnicodeString( &str ); pRtlCreateUnicodeStringFromAsciiz( &str, "test_subkey2\\test\\" ); status = pNtCreateKey( &subkey2, am, &attr, 0, 0, 0, 0 ); ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status ); @@ -1344,7 +1346,11 @@ static DWORD get_key_value( HANDLE root, const char *name, DWORD flags ) pRtlCreateUnicodeStringFromAsciiz( &str, name );
status = pNtOpenKey( &key, flags | KEY_ALL_ACCESS, &attr ); - if (status == STATUS_OBJECT_NAME_NOT_FOUND) return 0; + if (status == STATUS_OBJECT_NAME_NOT_FOUND) + { + pRtlFreeUnicodeString( &str ); + return 0; + } ok( status == STATUS_SUCCESS, "%08lx: NtCreateKey failed: 0x%08lx\n", flags, status );
status = pNtQueryValueKey( key, &value_str, KeyValuePartialInformation, info, len, &len );