mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Merge pull request #2266 from kaleb-himes/ZD-5154
Check correct allocation assignment. Thanks to R.A. for the report on…
This commit is contained in:
@ -198,8 +198,10 @@ int wc_PBKDF2(byte* output, const byte* passwd, int pLen, const byte* salt,
|
|||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
return MEMORY_E;
|
return MEMORY_E;
|
||||||
hmac = (Hmac*)XMALLOC(sizeof(Hmac), NULL, DYNAMIC_TYPE_HMAC);
|
hmac = (Hmac*)XMALLOC(sizeof(Hmac), NULL, DYNAMIC_TYPE_HMAC);
|
||||||
if (buffer == NULL)
|
if (hmac == NULL) {
|
||||||
|
XFREE(buffer, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
return MEMORY_E;
|
return MEMORY_E;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = wc_HmacInit(hmac, NULL, INVALID_DEVID);
|
ret = wc_HmacInit(hmac, NULL, INVALID_DEVID);
|
||||||
|
Reference in New Issue
Block a user