]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: drbg - fix freeing of resources
authorStephan Mueller <smueller@chronox.de>
Thu, 14 Sep 2017 15:10:28 +0000 (17:10 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 20 Sep 2017 09:42:29 +0000 (17:42 +0800)
commit9752b33d2aebe9d1d0dea8bf8d7673d4ceb972a9
treea9944827084eba41168a6a96833f06c6b134afc5
parent384fde7ed224f283f11ef2a592b05d4a29492aa8
crypto: drbg - fix freeing of resources

During the change to use aligned buffers, the deallocation code path was
not updated correctly. The current code tries to free the aligned buffer
pointer and not the original buffer pointer as it is supposed to.

Thus, the code is updated to free the original buffer pointer and set
the aligned buffer pointer that is used throughout the code to NULL.

Fixes: c9d1d78f28c2d ("crypto: drbg - use aligned buffers")
CC: <stable@vger.kernel.org>
CC: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/drbg.c