]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: dh - fix memleak in setkey
authorTudor-Dan Ambarus <tudor.ambarus@microchip.com>
Thu, 25 May 2017 07:18:07 +0000 (10:18 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 10 Jun 2017 04:04:26 +0000 (12:04 +0800)
commit67839363510d80d3502077631b5315f6502da13d
treeeb077fddef51f7e0abd4a9fba05ca523cff91b49
parentc6cfe61dd646704ce0a84f0bc43c08f520f5e64e
crypto: dh - fix memleak in setkey

setkey can be called multiple times during the existence
of the transformation object. In case of multiple setkey calls,
the old key was not freed and we leaked memory.
Free the old MPI key if any.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/dh.c