Leave and immediately reenter the critical section in sodium_misuse()

Keep running everything in the critical section from there.
This commit is contained in:
Frank Denis
2017-11-01 01:48:23 +01:00
parent 4bd18252d4
commit 5d484e6cb2
+2 -1
View File
@@ -178,9 +178,10 @@ sodium_misuse(void)
{
void (*handler)(void);
sodium_crit_leave();
if (sodium_crit_enter() == 0) {
handler = _misuse_handler;
if (sodium_crit_leave() == 0 && handler != NULL) {
if (handler != NULL) {
handler();
}
}