]> git.baikalelectronics.ru Git - uboot.git/commit
lib: rsa: free local arrays after use in rsa_gen_key_prop()
authorHeiko Stuebner <heiko.stuebner@theobroma-systems.com>
Thu, 18 Jun 2020 14:23:25 +0000 (16:23 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 8 Jul 2020 21:21:46 +0000 (17:21 -0400)
commit46024ebbd93252489d7785343041868a1f7687fd
tree76ef58531014b3aa70cfb79ed5551b8355afee80
parent898fd754c5425e79da40819d437e9309c2f3b1e1
lib: rsa: free local arrays after use in rsa_gen_key_prop()

n, rr and rrtmp are used for internal calculations, but in the end
the results are copied into separately allocated elements of the
actual key_prop, so the n, rr and rrtmp elements are not used anymore
when returning from the function and should of course be freed.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
lib/rsa/rsa-keyprop.c