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

sha1: Return right away if l_checksum_new fails

This commit is contained in:
Denis Kenzior 2015-03-20 14:50:57 -05:00
parent d277456852
commit b27c47aa77

View File

@ -80,6 +80,8 @@ bool hmac_sha1(const void *key, size_t key_len,
struct l_checksum *checksum; struct l_checksum *checksum;
checksum = l_checksum_new(L_CHECKSUM_SHA1); checksum = l_checksum_new(L_CHECKSUM_SHA1);
if (!checksum)
return false;
__hmac_sha1(checksum, key, key_len, data, data_len, output, size); __hmac_sha1(checksum, key, key_len, data, data_len, output, size);