mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 02:39:44 +00:00
Possible race condition in command cleanup due to linking order, (Fixes #136)
This commit is contained in:
parent
39f582ccab
commit
9ba27b28a0
@ -2247,4 +2247,5 @@ static void keyring_on_cmd_cleanup()
|
||||
{
|
||||
keyring_free(keyring);
|
||||
keyring = NULL;
|
||||
free_subscribers();
|
||||
}
|
||||
|
@ -143,16 +143,6 @@ void free_subscribers()
|
||||
tree_walk(&root, NULL, 0, free_node, NULL);
|
||||
}
|
||||
|
||||
/* Free the subscribers tree after every CLI command.
|
||||
*/
|
||||
|
||||
static void subscriber_on_cmd_cleanup();
|
||||
DEFINE_TRIGGER(cmd_cleanup, subscriber_on_cmd_cleanup);
|
||||
static void subscriber_on_cmd_cleanup()
|
||||
{
|
||||
free_subscribers();
|
||||
}
|
||||
|
||||
static void *create_subscriber(void *UNUSED(context), const uint8_t *binary, size_t bin_length)
|
||||
{
|
||||
assert(bin_length == SID_SIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user