Sven Baars : ntdll/tests: Fix some string leaks (Valgrind).

Alexandre Julliard julliard at winehq.org
Fri Jan 18 16:51:24 CST 2019


Module: wine
Branch: master
Commit: ba3e07420e9b81d83166d4b84a168553c031c32d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ba3e07420e9b81d83166d4b84a168553c031c32d

Author: Sven Baars <sven.wine at gmail.com>
Date:   Fri Jan 18 17:18:31 2019 +0100

ntdll/tests: Fix some string leaks (Valgrind).

Signed-off-by: Sven Baars <sven.wine at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/tests/file.c | 2 ++
 dlls/ntdll/tests/reg.c  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index dcea45e..8391570 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -3662,6 +3662,8 @@ static void test_file_mode(void)
         if (option_tests[i].file_name == &file_name)
             DeleteFileW(dos_file_name);
     }
+
+    pRtlFreeUnicodeString(&file_name);
 }
 
 static void test_query_volume_information_file(void)
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c
index b59d267..9bb8d25 100644
--- a/dlls/ntdll/tests/reg.c
+++ b/dlls/ntdll/tests/reg.c
@@ -2008,6 +2008,8 @@ static void test_RtlCreateRegistryKey(void)
 
     status = pRtlCreateRegistryKey((RTL_REGISTRY_USER+1) | RTL_REGISTRY_OPTIONAL, NULL);
     ok(status == STATUS_INVALID_PARAMETER, "RtlCreateRegistryKey unexpected return value: %08x, expected %08x\n", status, STATUS_INVALID_PARAMETER);
+
+    pRtlFreeUnicodeString(&str);
 }
 
 START_TEST(reg)




More information about the wine-cvs mailing list