diff --git a/sdk/lib/rtl/path.c b/sdk/lib/rtl/path.c index 360c68df735..e045e16ebb4 100644 --- a/sdk/lib/rtl/path.c +++ b/sdk/lib/rtl/path.c @@ -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 */ diff --git a/sdk/lib/rtl/registry.c b/sdk/lib/rtl/registry.c index bc69d4d0b33..3172213265f 100644 --- a/sdk/lib/rtl/registry.c +++ b/sdk/lib/rtl/registry.c @@ -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; }