diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-01-10 13:56:49 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-01-10 13:56:49 +0100 |
commit | 34c8dc504bf60371db258d3b19353e725d23b1bb (patch) | |
tree | 64ad1037fd4780fff1c3019f73ebe7aa8e996b27 | |
parent | 551562701e1f48712a0143d0d152b518342f0883 (diff) | |
download | exchange-34c8dc504bf60371db258d3b19353e725d23b1bb.tar.xz |
do not crash if keystate fails to load
-rw-r--r-- | src/exchange/taler-exchange-httpd_keystate.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c index ec565dac2..1390f95a3 100644 --- a/src/exchange/taler-exchange-httpd_keystate.c +++ b/src/exchange/taler-exchange-httpd_keystate.c @@ -1685,6 +1685,12 @@ TEH_KS_acquire_ (const char *location) { internal_key_state = make_fresh_key_state (); /* bump RC by 1 if we released internal_key_state above */ + if (NULL == internal_key_state) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed to initialize key state\n"); + return NULL; + } internal_key_state->refcnt += rcd; } key_state = internal_key_state; |