Skip to content
Commit e8b22363 authored by Jerzy Kasenberg's avatar Jerzy Kasenberg Committed by David Brown
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>
parent 1cac1eb9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment