Without this, if a virtual server, for example, has the same name as a
module which registers an xlat in its name, then, during server
shutdown, removing the process module for the virtual server attempts to
unregister the xlat which it doesn't own and leads to a seg fault.
* Remove all xlat's registered to module instance.
*/
if (mi->data) {
- xlat_func_unregister(mi->name);
+ if (mi->module->type == DL_MODULE_TYPE_MODULE) xlat_func_unregister(mi->name);
xlat_func_unregister_module(mi);
}