mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
Minor fixes to rtl string functions.
This commit is contained in:
parent
970987586e
commit
198557261b
@ -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) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user