crypto: crypto4xx - fix crypto4xx_build_pdr, crypto4xx_build_sdr leak
commitbb447b804dfc235d4f74d73b034d65aaf89f74f5
authorChristian Lamparter <chunkeey@googlemail.com>
Fri, 25 Aug 2017 13:47:24 +0000 (25 15:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Jul 2018 11:43:24 +0000 (22 13:43 +0200)
tree2af3cced035c1920665e12c148e298d755fe5f1d
parent2750ee7cf74779ec16188051af44bed6e89089b4
crypto: crypto4xx - fix crypto4xx_build_pdr, crypto4xx_build_sdr leak

commit 5d59ad6eea82ef8df92b4109615a0dde9d8093e9 upstream.

If one of the later memory allocations in rypto4xx_build_pdr()
fails: dev->pdr (and/or) dev->pdr_uinfo wouldn't be freed.

crypto4xx_build_sdr() has the same issue with dev->sdr.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/amcc/crypto4xx_core.c