Resend: [PATCH] crypto: don't check for NULL before kfree(), it's redundant.
Here's a resend of a patch originally for 2.6.12-rc1-mm4. It still applies to 2.6.12-rc6
The patch removes redundant checks of NULL before kfree() in crypto/ .
Patch attached as well as inline since I don't know how well gmail handles inline patches.
---
crypto/cipher.c | 3 +-- crypto/hmac.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
crypto/cipher.c +1 -2
@@ -336,6 +336,5 @@ out:void crypto_exit_cipher_ops (struct crypto_tfm *tfm) { -if (tfm->crt_cipher.cit_iv) -kfree (tfm->crt_cipher.cit_iv); +kfree (tfm->crt_cipher.cit_iv); }
crypto/hmac.c +1 -2
@@ -49,8 +49,7 @@ int crypto_alloc_hmac_block(struct cryptvoid crypto_free_hmac_block (struct crypto_tfm *tfm) { -if (tfm->crt_digest.dit_hmac_block) -kfree (tfm->crt_digest.dit_hmac_block); +kfree (tfm->crt_digest.dit_hmac_block); }void crypto_hmac_init (struct crypto_tfm *tfm,u8 *key,unsigned int *keylen)
Signature · 3 lines
Jesper Juhl <[email protected]> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html
crypto/cipher.c +1 -2
@@ -336,6 +336,5 @@ out:void crypto_exit_cipher_ops (struct crypto_tfm *tfm) { -if (tfm->crt_cipher.cit_iv) -kfree (tfm->crt_cipher.cit_iv); +kfree (tfm->crt_cipher.cit_iv); }
crypto/hmac.c +1 -2
@@ -49,8 +49,7 @@ int crypto_alloc_hmac_block(struct cryptvoid crypto_free_hmac_block (struct crypto_tfm *tfm) { -if (tfm->crt_digest.dit_hmac_block) -kfree (tfm->crt_digest.dit_hmac_block); +kfree (tfm->crt_digest.dit_hmac_block); }void crypto_hmac_init (struct crypto_tfm *tfm,u8 *key,unsigned int *keylen)
Herbert Xu
maintainerQuoted 8 lines · Jesper Juhl
Here's a resend of a patch originally for 2.6.12-rc1-mm4. It still applies to 2.6.12-rc6
The patch removes redundant checks of NULL before
kfree()incrypto/.Patch attached as well as inline since I don't know how well gmail handles inline patches.
I've already merged your patch. It will be pushed upstream after 2.6.12 is released.
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtQuoted 5 lines · Herbert Xu
Quoted 4 lines · Jesper Juhl
Here's a resend of a patch originally for 2.6.12-rc1-mm4. It still applies to 2.6.12-rc6
Quoted 7 lines
Quoted 4 lines
The patch removes redundant checks of NULL before
kfree()incrypto/.Patch attached as well as inline since I don't know how well gmail handles inline patches.
I've already merged your patch. It will be pushed upstream after 2.6.12 is released.
Ohh, ok. Thanks. I need to keep better track of what patches people have already merged.
Signature · 3 lines
Jesper Juhl <[email protected]> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html