simplify logic
This commit is contained in:
parent
246f3a7f94
commit
5e15bc6f28
@ -1640,6 +1640,7 @@ build_key_state (struct HelperState *hs,
|
|||||||
setup_key_helpers (ksh->helpers))
|
setup_key_helpers (ksh->helpers))
|
||||||
{
|
{
|
||||||
GNUNET_free (ksh->helpers);
|
GNUNET_free (ksh->helpers);
|
||||||
|
GNUNET_assert (NULL == ksh->management_keys_reply);
|
||||||
GNUNET_free (ksh);
|
GNUNET_free (ksh);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1768,15 +1769,12 @@ get_key_state (bool management_only)
|
|||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
if (NULL != ksh)
|
if (NULL != ksh)
|
||||||
destroy_key_state (ksh,
|
destroy_key_state (ksh,
|
||||||
(NULL == old_ksh));
|
false);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (NULL != old_ksh)
|
old_ksh->helpers = NULL;
|
||||||
{
|
destroy_key_state (old_ksh,
|
||||||
old_ksh->helpers = NULL;
|
false);
|
||||||
destroy_key_state (old_ksh,
|
|
||||||
false);
|
|
||||||
}
|
|
||||||
return ksh;
|
return ksh;
|
||||||
}
|
}
|
||||||
sync_key_helpers (old_ksh->helpers);
|
sync_key_helpers (old_ksh->helpers);
|
||||||
|
Loading…
Reference in New Issue
Block a user