From 32ba50a0f0a0e3faeeb788f920fe407e75db7d5d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 3 Mar 2020 12:34:24 +0100 Subject: [PATCH] fix potential NPE --- src/exchange/taler-exchange-httpd_keystate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c index 9be78e5e4..357616d1a 100644 --- a/src/exchange/taler-exchange-httpd_keystate.c +++ b/src/exchange/taler-exchange-httpd_keystate.c @@ -1924,7 +1924,8 @@ TEH_KS_acquire_ (struct GNUNET_TIME_Absolute now, { os = internal_key_state; internal_key_state = make_fresh_key_state (now); - internal_key_state->refcnt = 1; /* alias from #internal_key_state */ + if (NULL != internal_key_state) + internal_key_state->refcnt = 1; /* alias from #internal_key_state */ if (NULL != os) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,