diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-07-06 13:54:31 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-06 13:54:31 -0700 |
commit | a61cc44812ff94793987bf43b70a3d9bc64a6820 (patch) | |
tree | 65cf93c2a89fb0072a69c2904202713a2e895098 /crypto/des.c | |
parent | 476df259cd577e20379b02a7f7ffd086ea925a83 (diff) |
[CRYPTO] Add null short circuit to crypto_free_tfm
As far as I'm aware there's a general concensus that functions that are
responsible for freeing resources should be able to cope with being passed
a NULL pointer. This makes sense as it removes the need for all callers to
check for NULL, thus elliminating the bugs that happen when some forget
(safer to just check centrally in the freeing function) and it also makes
for smaller code all over due to the lack of all those NULL checks.
This patch makes it safe to pass the crypto_free_tfm() function a NULL
pointer. Once this patch is applied we can start removing the NULL checks
from the callers.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'crypto/des.c')
0 files changed, 0 insertions, 0 deletions