wine/dlls/ntdll rtlstr.c
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Nov 2 05:42:31 CST 2005
ChangeSet ID: 21040
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/11/02 05:42:31
Modified files:
dlls/ntdll : rtlstr.c
Log message:
Ivan Leo Puoti <ivanleo at gmail.com>
Minor fixes to rtl string functions.
Patch: http://cvs.winehq.org/patch.py?id=21040
Old revision New revision Changes Path
1.54 1.55 +11 -2 wine/dlls/ntdll/rtlstr.c
Index: wine/dlls/ntdll/rtlstr.c
diff -u -p wine/dlls/ntdll/rtlstr.c:1.54 wine/dlls/ntdll/rtlstr.c:1.55
--- wine/dlls/ntdll/rtlstr.c:1.54 2 Nov 2005 11:42:31 -0000
+++ wine/dlls/ntdll/rtlstr.c 2 Nov 2005 11:42:31 -0000
@@ -28,6 +28,7 @@
#include <string.h>
#include "windef.h"
+#include "winnt.h"
#include "winternl.h"
#include "wine/unicode.h"
#include "wine/debug.h"
@@ -128,7 +129,11 @@ void WINAPI RtlInitString(
*/
void WINAPI RtlFreeAnsiString( PSTRING str )
{
- if (str->Buffer) RtlFreeHeap( GetProcessHeap(), 0, str->Buffer );
+ if (str->Buffer)
+ {
+ RtlFreeHeap( GetProcessHeap(), 0, str->Buffer );
+ RtlZeroMemory( str, sizeof(*str) );
+ }
}
@@ -267,7 +272,11 @@ BOOLEAN WINAPI RtlCreateUnicodeStringFro
*/
void WINAPI RtlFreeUnicodeString( PUNICODE_STRING str )
{
- if (str->Buffer) RtlFreeHeap( GetProcessHeap(), 0, str->Buffer );
+ if (str->Buffer)
+ {
+ RtlFreeHeap( GetProcessHeap(), 0, str->Buffer );
+ RtlZeroMemory( str, sizeof(*str) );
+ }
}
More information about the wine-cvs
mailing list