add use of heap hint for malloc

This commit is contained in:
Jacob Barthelmeh
2021-06-03 23:38:30 +07:00
parent 88370285cc
commit 66c7acb076

View File

@@ -3990,7 +3990,7 @@ int TraditionalEnc(byte* key, word32 keySz, byte* out, word32* outSz,
ret = 0; ret = 0;
} }
if (ret == 0) { if (ret == 0) {
pkcs8Key = (byte*)XMALLOC(pkcs8KeySz, NULL, DYNAMIC_TYPE_TMP_BUFFER); pkcs8Key = (byte*)XMALLOC(pkcs8KeySz, heap, DYNAMIC_TYPE_TMP_BUFFER);
if (pkcs8Key == NULL) if (pkcs8Key == NULL)
ret = MEMORY_E; ret = MEMORY_E;
} }
@@ -4009,7 +4009,7 @@ int TraditionalEnc(byte* key, word32 keySz, byte* out, word32* outSz,
if (pkcs8Key != NULL) { if (pkcs8Key != NULL) {
ForceZero(pkcs8Key, pkcs8KeySz); ForceZero(pkcs8Key, pkcs8KeySz);
XFREE(pkcs8Key, NULL, DYNAMIC_TYPE_TMP_BUFFER); XFREE(pkcs8Key, heap, DYNAMIC_TYPE_TMP_BUFFER);
} }
(void)rng; (void)rng;