mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-02 11:13:02 +09:00
commitc5f39d0786upstream. crypto_ahash_import() may be called either after crypto_ahash_init() or without such call. Right now we always internally call init() as part of import(), thus leaking memory and mappings if the user has already called init() herself. Fix this by only calling init() internally if the state is not already initialized. Fixes: commit454527d0d9("staging: ccree: fix hash import/export") Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>