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
1 changed files with 2 additions and 0 deletions

View File

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