forked from wolfSSL/wolfssl
Feedback changes implemented
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 (hmac == 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