bootutil: Fix crash when bootutil_sha_init() is called in loop
For mynewt hardware implementation of hash functionality calling bootutil_sha_init() in a loop without call to bootutil_sha_drop() result in a failure. In two places where bootutil_sha_drop() was called after the loop, call is move into the loop to match calls to bootutil_sha_init(). This will not impact default implementation where calling bootutil_sha_drop() in a loop does not change anything. Signed-off-by:Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl> (cherry picked from commit e8b22363)
Loading
Please sign in to comment