Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235075
b: refs/heads/master
c: fc9044e
h: refs/heads/master
i:
  235073: 9d6273a
  235071: b5b9cc9
v: v3
  • Loading branch information
Jesper Juhl authored and Herbert Xu committed Feb 16, 2011
1 parent c86c229 commit c31ded3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 36be070ac600d023ada2ec107ee925f5ac5f902b
refs/heads/master: fc9044e2db8c13746cd886d6276028b27ed5c78e
15 changes: 6 additions & 9 deletions trunk/arch/x86/crypto/aesni-intel_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,19 +874,17 @@ rfc4106_set_hash_subkey(u8 *hash_subkey, const u8 *key, unsigned int key_len)

ret = crypto_ablkcipher_setkey(ctr_tfm, key, key_len);
if (ret)
goto out;
goto out_free_ablkcipher;

ret = -ENOMEM;
req = ablkcipher_request_alloc(ctr_tfm, GFP_KERNEL);
if (!req) {
ret = -EINVAL;
if (!req)
goto out_free_ablkcipher;
}

req_data = kmalloc(sizeof(*req_data), GFP_KERNEL);
if (!req_data) {
ret = -ENOMEM;
if (!req_data)
goto out_free_request;
}

memset(req_data->iv, 0, sizeof(req_data->iv));

/* Clear the data in the hash sub key container to zero.*/
Expand All @@ -911,12 +909,11 @@ rfc4106_set_hash_subkey(u8 *hash_subkey, const u8 *key, unsigned int key_len)
if (!ret)
ret = req_data->result.err;
}
kfree(req_data);
out_free_request:
ablkcipher_request_free(req);
kfree(req_data);
out_free_ablkcipher:
crypto_free_ablkcipher(ctr_tfm);
out:
return ret;
}

Expand Down

0 comments on commit c31ded3

Please sign in to comment.