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:
@ -351,6 +351,14 @@ unregister_module(const char *module)
|
|||||||
{
|
{
|
||||||
ptr = ptr->next;
|
ptr = ptr->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*<
|
||||||
|
* Remove the module to be be freed from the list.
|
||||||
|
*/
|
||||||
|
if (ptr && (ptr->next == mod))
|
||||||
|
{
|
||||||
|
ptr->next = ptr->next->next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*<
|
/*<
|
||||||
|
|||||||
Reference in New Issue
Block a user