crypto: ixp4xx - Fix error handling path in 'aead_perform()'
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 2 Aug 2017 08:40:47 +0000 (16:40 +0800)
committerpopcornmix <popcornmix@gmail.com>
Fri, 25 Aug 2017 16:35:08 +0000 (17:35 +0100)
commit94abd3ca2c51facd2571e56bad2e5fee8a889c64
tree0820e7260f7a6238f2854a28529935c082b158b4
parent511d5abcb5c79d03a4a0700fb4e6d5766c1148a4
crypto: ixp4xx - Fix error handling path in 'aead_perform()'

commit 28389575a8cf933a5f3c378556b9f4d3cce0efd2 upstream.

In commit 0f987e25cb8a, the source processing has been moved in front of
the destination processing, but the error handling path has not been
modified accordingly.
Free resources in the correct order to avoid some leaks.

Fixes: 0f987e25cb8a ("crypto: ixp4xx - Fix false lastlen uninitialised warning")
Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ixp4xx_crypto.c