mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[SDK:RTL] Consistently use the Allocate/FreeStringMemory helpers when allocating/freeing string buffers.
This commit is contained in:
parent
ab827f5225
commit
e51c305f51
2 changed files with 3 additions and 3 deletions
|
@ -2532,11 +2532,11 @@ Quickie:
|
|||
DPRINT("Status: %lx %S %S\n", Status, StaticBuffer, TempDynamicString.Buffer);
|
||||
if ((StaticString) && (StaticBuffer) && (StaticBuffer != StaticString->Buffer))
|
||||
{
|
||||
RtlpFreeMemory(StaticBuffer, TAG_USTR);
|
||||
RtlpFreeStringMemory(StaticBuffer, TAG_USTR);
|
||||
}
|
||||
if (TempDynamicString.Buffer)
|
||||
{
|
||||
RtlpFreeMemory(TempDynamicString.Buffer, TAG_USTR);
|
||||
RtlpFreeStringMemory(TempDynamicString.Buffer, TAG_USTR);
|
||||
}
|
||||
|
||||
/* Print out any unusual errors */
|
||||
|
|
|
@ -61,7 +61,7 @@ RtlpQueryRegistryDirect(IN ULONG ValueType,
|
|||
if (!ReturnString->Buffer)
|
||||
{
|
||||
/* Allocate it */
|
||||
ReturnString->Buffer = RtlpAllocateMemory(ActualLength, TAG_RTLREGISTRY);
|
||||
ReturnString->Buffer = RtlpAllocateStringMemory(ActualLength, TAG_RTLREGISTRY);
|
||||
if (!ReturnString->Buffer) return STATUS_NO_MEMORY;
|
||||
ReturnString->MaximumLength = ActualLength;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue