* Resend: [PATCH] crypto: don't check for NULL before kfree(), it's redundant.
@ 2005-06-06 23:50 Jesper Juhl
2005-06-07 2:34 ` Herbert Xu
0 siblings, 1 reply; 3+ messages in thread
From: Jesper Juhl @ 2005-06-06 23:50 UTC (permalink / raw)
To: James Morris; +Cc: Andrew Morton, Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]
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.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
crypto/cipher.c | 3 +--
crypto/hmac.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff -upr linux-2.6.12-rc6-orig/crypto/cipher.c linux-2.6.12-rc6/crypto/cipher.c
--- linux-2.6.12-rc6-orig/crypto/cipher.c 2005-06-07 00:07:12.000000000 +0200
+++ linux-2.6.12-rc6/crypto/cipher.c 2005-06-07 01:49:16.000000000 +0200
@@ -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);
}
diff -upr linux-2.6.12-rc6-orig/crypto/hmac.c linux-2.6.12-rc6/crypto/hmac.c
--- linux-2.6.12-rc6-orig/crypto/hmac.c 2005-03-02 08:38:09.000000000 +0100
+++ linux-2.6.12-rc6/crypto/hmac.c 2005-06-07 01:49:16.000000000 +0200
@@ -49,8 +49,7 @@ int crypto_alloc_hmac_block(struct crypt
void 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)
--
Jesper Juhl <jesper.juhl@gmail.com>
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: crypto-kfree.patch --]
[-- Type: text/x-patch; name="crypto-kfree.patch", Size: 961 bytes --]
diff -upr linux-2.6.12-rc6-orig/crypto/cipher.c linux-2.6.12-rc6/crypto/cipher.c
--- linux-2.6.12-rc6-orig/crypto/cipher.c 2005-06-07 00:07:12.000000000 +0200
+++ linux-2.6.12-rc6/crypto/cipher.c 2005-06-07 01:49:16.000000000 +0200
@@ -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);
}
diff -upr linux-2.6.12-rc6-orig/crypto/hmac.c linux-2.6.12-rc6/crypto/hmac.c
--- linux-2.6.12-rc6-orig/crypto/hmac.c 2005-03-02 08:38:09.000000000 +0100
+++ linux-2.6.12-rc6/crypto/hmac.c 2005-06-07 01:49:16.000000000 +0200
@@ -49,8 +49,7 @@ int crypto_alloc_hmac_block(struct crypt
void 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)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Resend: [PATCH] crypto: don't check for NULL before kfree(), it's redundant.
2005-06-06 23:50 Resend: [PATCH] crypto: don't check for NULL before kfree(), it's redundant Jesper Juhl
@ 2005-06-07 2:34 ` Herbert Xu
2005-06-07 13:13 ` Jesper Juhl
0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2005-06-07 2:34 UTC (permalink / raw)
To: Jesper Juhl; +Cc: jmorris, akpm, linux-kernel
Jesper Juhl <jesper.juhl@gmail.com> wrote:
>
> 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.
I've already merged your patch. It will be pushed upstream after
2.6.12 is released.
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Resend: [PATCH] crypto: don't check for NULL before kfree(), it's redundant.
2005-06-07 2:34 ` Herbert Xu
@ 2005-06-07 13:13 ` Jesper Juhl
0 siblings, 0 replies; 3+ messages in thread
From: Jesper Juhl @ 2005-06-07 13:13 UTC (permalink / raw)
To: Herbert Xu; +Cc: jmorris, akpm, linux-kernel
On 6/7/05, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> Jesper Juhl <jesper.juhl@gmail.com> wrote:
> >
> > 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.
>
> 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.
--
Jesper Juhl <jesper.juhl@gmail.com>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-06-07 13:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-06 23:50 Resend: [PATCH] crypto: don't check for NULL before kfree(), it's redundant Jesper Juhl
2005-06-07 2:34 ` Herbert Xu
2005-06-07 13:13 ` Jesper Juhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox