do not crash if keystate fails to load
This commit is contained in:
parent
551562701e
commit
34c8dc504b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user