3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 10:39:23 +01:00

eap-pwd: fix potential memory leak

This commit is contained in:
James Prestwood 2019-10-16 15:29:46 -07:00 committed by Denis Kenzior
parent e31074b246
commit 8364807938

View File

@ -115,8 +115,10 @@ static bool kdf(uint8_t *key, size_t key_len, const char *label,
iov[iov_pos].iov_base = &L;
iov[iov_pos++].iov_len = 2;
if (!l_checksum_updatev(hmac, iov, iov_pos))
if (!l_checksum_updatev(hmac, iov, iov_pos)) {
l_checksum_free(hmac);
return false;
}
l_checksum_get_digest(hmac, out + len, minsize(olen - len, 32));
l_checksum_free(hmac);