Skip to content
Commit 18d9df1f authored by Jerzy Kasenberg's avatar Jerzy Kasenberg Committed by Jamie McCrae
Browse files

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: default avatarJerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
(cherry picked from commit e8b22363)
parent c2f2f90d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment