Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1b87887d6c232becba77835b29a424cf78442b7d Commit: 1b87887d6c232becba77835b29a424cf78442b7d Parent: 2a999a3abb2d3885741b09b9d05280db7e757544 Author: Herbert Xu <[EMAIL PROTECTED]> AuthorDate: Tue Jan 1 15:44:50 2008 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Fri Jan 11 08:17:00 2008 +1100
[CRYPTO] xcbc: Fix algorithm leak when block size check fails When the underlying algorithm has a block size other than 16 we abort without freeing it. In fact, we try to return the algorithm itself as an error! This patch plugs the leak and makes it return -EINVAL instead. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- crypto/xcbc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/crypto/xcbc.c b/crypto/xcbc.c index 789cdee..e3d9503 100644 --- a/crypto/xcbc.c +++ b/crypto/xcbc.c @@ -307,7 +307,8 @@ static struct crypto_instance *xcbc_alloc(struct rtattr **tb) case 16: break; default: - return ERR_PTR(PTR_ERR(alg)); + inst = ERR_PTR(-EINVAL); + goto out_put_alg; } inst = crypto_alloc_instance("xcbc", alg); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html