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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Aug 2017 00:12:18 +0000 (17:12 -0700)
commit24e7f540245d555f6bcd930a677f8f9056028853
tree2776e626b6e7e1e7fbf37c729771d4585881410b
parent93f5a0318aae53541a4c53eca444917755b15a40
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