rsa: let rsa_of_read_key() return a fully allocated key
Until now rsa_of_read_key() took a pointer to a key and filled the
struct rsa_public_key members with allocated values. So far we have
never freed these values. Change rsa_of_read_key() to always return
a fully allocated key and provide rsa_key_free() to free it. Let the
FIT image code free the key after usage.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 128ad3c commit d091a81f3ece732826dd4dec0b241624159ae1d6
@Sascha Hauer Sascha Hauer authored on 1 Oct 2019
Showing 3 changed files
View
common/image-fit.c
View
crypto/rsa.c
View
include/rsa.h