[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 02/03: fix leak of old keystate if loading of new keyst
From: |
gnunet |
Subject: |
[taler-exchange] 02/03: fix leak of old keystate if loading of new keystate failed |
Date: |
Sun, 29 Mar 2020 01:58:48 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 937065ae9f57fca99e2f9af95e172f400edef8d6
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Mar 29 01:58:27 2020 +0100
fix leak of old keystate if loading of new keystate failed
---
src/exchange/taler-exchange-httpd_keystate.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/exchange/taler-exchange-httpd_keystate.c
b/src/exchange/taler-exchange-httpd_keystate.c
index 4117c13a..3e856633 100644
--- a/src/exchange/taler-exchange-httpd_keystate.c
+++ b/src/exchange/taler-exchange-httpd_keystate.c
@@ -986,6 +986,11 @@ reload_keys_sign_iter (
now.abs_value_us) )
{
/* We use the most recent one, if it is valid now (not just in the near
future) */
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Found signing key valid until `%s'\n",
+ GNUNET_STRINGS_absolute_time_to_string (
+ GNUNET_TIME_absolute_ntoh (
+ key_state->current_sign_key_issue.issue.end)));
key_state->current_sign_key_issue = *ski;
}
if (0 !=
@@ -1965,10 +1970,12 @@ TEH_KS_acquire_ (struct GNUNET_TIME_Absolute now,
}
if (NULL == internal_key_state)
{
- /* We tried and failed (again) to setup #internal_key_state */
+ /* We tried and failed to setup #internal_key_state */
GNUNET_assert (0 == pthread_mutex_unlock (&internal_key_state_mutex));
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to initialize key state\n");
+ if (NULL != os)
+ ks_free (os);
return NULL;
}
key_state = internal_key_state;
--
To stop receiving notification emails like this one, please contact
address@hidden.