Remove module to be freed from list.
When a module is unregistered, it must be removed from the list. Otherwise, if explicit unregistering of a module is made, there will be a crash at shutdown when all modules are unregistered.
This commit is contained in:
parent
e777828bd0
commit
62aa1ea5d7
@ -351,6 +351,14 @@ unregister_module(const char *module)
|
||||
{
|
||||
ptr = ptr->next;
|
||||
}
|
||||
|
||||
/*<
|
||||
* Remove the module to be be freed from the list.
|
||||
*/
|
||||
if (ptr && (ptr->next == mod))
|
||||
{
|
||||
ptr->next = ptr->next->next;
|
||||
}
|
||||
}
|
||||
|
||||
/*<
|
||||
|
Loading…
x
Reference in New Issue
Block a user