Hans Leidekker : ntdll/tests: Fix a memory leak.
Alexandre Julliard
julliard at winehq.org
Mon Dec 7 10:26:17 CST 2009
Module: wine
Branch: master
Commit: 72e7e399d5eba9a265ac9936e5b05bd04c3e4eb5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=72e7e399d5eba9a265ac9936e5b05bd04c3e4eb5
Author: Hans Leidekker <hans at codeweavers.com>
Date: Mon Dec 7 10:32:03 2009 +0100
ntdll/tests: Fix a memory leak.
Found by Valgrind.
---
dlls/ntdll/tests/directory.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
index 60c0158..c16b461 100644
--- a/dlls/ntdll/tests/directory.c
+++ b/dlls/ntdll/tests/directory.c
@@ -43,6 +43,7 @@ static NTSTATUS (WINAPI *pNtQueryDirectoryFile)(HANDLE,HANDLE,PIO_APC_ROUTINE,PV
static BOOLEAN (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING,LPCSTR);
static BOOL (WINAPI *pRtlDosPathNameToNtPathName_U)( LPCWSTR, PUNICODE_STRING, PWSTR*, CURDIR* );
static VOID (WINAPI *pRtlInitUnicodeString)( PUNICODE_STRING, LPCWSTR );
+static VOID (WINAPI *pRtlFreeUnicodeString)( PUNICODE_STRING );
static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen,
LPCSTR src, DWORD srclen );
static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirection)( BOOLEAN enable );
@@ -221,6 +222,7 @@ static void test_NtQueryDirectoryFile(void)
pNtClose(dirh);
done:
tear_down_attribute_test(testdirA);
+ pRtlFreeUnicodeString(&ntdirname);
}
static void test_redirection(void)
@@ -281,6 +283,7 @@ START_TEST(directory)
pRtlCreateUnicodeStringFromAsciiz = (void *)GetProcAddress(hntdll, "RtlCreateUnicodeStringFromAsciiz");
pRtlDosPathNameToNtPathName_U = (void *)GetProcAddress(hntdll, "RtlDosPathNameToNtPathName_U");
pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString");
+ pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString");
pRtlMultiByteToUnicodeN = (void *)GetProcAddress(hntdll,"RtlMultiByteToUnicodeN");
pRtlWow64EnableFsRedirection = (void *)GetProcAddress(hntdll,"RtlWow64EnableFsRedirection");
pRtlWow64EnableFsRedirectionEx = (void *)GetProcAddress(hntdll,"RtlWow64EnableFsRedirectionEx");
More information about the wine-cvs
mailing list