Leave and immediately reenter the critical section in sodium_misuse()
Keep running everything in the critical section from there.
This commit is contained in:
parent
802830e4e6
commit
8d5b6b1fc9
@ -178,9 +178,10 @@ sodium_misuse(void)
|
|||||||
{
|
{
|
||||||
void (*handler)(void);
|
void (*handler)(void);
|
||||||
|
|
||||||
|
sodium_crit_leave();
|
||||||
if (sodium_crit_enter() == 0) {
|
if (sodium_crit_enter() == 0) {
|
||||||
handler = _misuse_handler;
|
handler = _misuse_handler;
|
||||||
if (sodium_crit_leave() == 0 && handler != NULL) {
|
if (handler != NULL) {
|
||||||
handler();
|
handler();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user