ntdll/tests: Free Unicode string before reuse.

Hans Leidekker hans at codeweavers.com
Wed Dec 9 04:45:49 CST 2009


Thanks Paul.
---
 dlls/ntdll/tests/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 7e8f101..9aade11 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -254,6 +254,7 @@ static void open_file_test(void)
     status = pNtOpenFile( &dir, GENERIC_READ, &attr, &io,
                           FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_DIRECTORY_FILE );
     ok( !status, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status );
+    pRtlFreeUnicodeString( &nameW );
 
     /* test opening system dir with RootDirectory set to windows dir */
     GetSystemDirectoryW( path, MAX_PATH );
@@ -337,7 +338,6 @@ static void open_file_test(void)
     }
 
     CloseHandle( dir );
-    pRtlFreeUnicodeString( &nameW );
 }
 
 static void delete_file_test(void)
-- 
1.6.3.3




More information about the wine-patches mailing list