Commit 19855726 authored by Ivan Leo Puoti's avatar Ivan Leo Puoti Committed by Alexandre Julliard

Minor fixes to rtl string functions.

parent 97098758
......@@ -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 RtlCreateUnicodeStringFromAsciiz( PUNICODE_STRING target, LPCSTR
*/
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) );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment