fix potential NPE

This commit is contained in:
Christian Grothoff 2020-03-03 12:34:24 +01:00
parent 5d67cb9c4f
commit 32ba50a0f0
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -1924,7 +1924,8 @@ TEH_KS_acquire_ (struct GNUNET_TIME_Absolute now,
{ {
os = internal_key_state; os = internal_key_state;
internal_key_state = make_fresh_key_state (now); 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) if (NULL != os)
{ {
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,