aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-19 17:14:14 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-19 17:14:14 +0100
commit9031f7340de800e5818a975ce3f7129f7258d1b9 (patch)
treefd42eecdbd9235f0513d86187f4d288d39ed119b /src
parentb6543b8f9a0ef4de473568ba27e05ba50442ee97 (diff)
try to fix mess for keystate locking
Diffstat (limited to 'src')
-rw-r--r--src/exchange/taler-exchange-httpd_keystate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c
index 3216c6ce6..f6306fc5d 100644
--- a/src/exchange/taler-exchange-httpd_keystate.c
+++ b/src/exchange/taler-exchange-httpd_keystate.c
@@ -2291,6 +2291,7 @@ TEH_KS_init (void)
if (NULL == internal_key_state)
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to setup initial key state. This exchange cannot work.\n");
+ internal_key_state->refcnt = 1;
}
@@ -2307,7 +2308,7 @@ TEH_KS_free ()
ks = internal_key_state;
if (NULL == ks)
return;
- GNUNET_assert (0 < ks->refcnt);
+ GNUNET_assert (1 == ks->refcnt);
ks->refcnt--;
ks_free (ks);
}