daemon: Remove scheduled jobs before unloading plugins
Especially callback jobs might refer to memory that gets invalid after the plugins got unlaoded, so make sure we destroy these jobs before. References #840.
This commit is contained in:
@@ -474,8 +474,9 @@ static void destroy(private_daemon_t *this)
|
|||||||
DESTROY_IF(this->public.connect_manager);
|
DESTROY_IF(this->public.connect_manager);
|
||||||
DESTROY_IF(this->public.mediation_manager);
|
DESTROY_IF(this->public.mediation_manager);
|
||||||
#endif /* ME */
|
#endif /* ME */
|
||||||
/* make sure the cache is clear before unloading plugins */
|
/* make sure the cache and scheduler are clear before unloading plugins */
|
||||||
lib->credmgr->flush_cache(lib->credmgr, CERT_ANY);
|
lib->credmgr->flush_cache(lib->credmgr, CERT_ANY);
|
||||||
|
lib->scheduler->flush(lib->scheduler);
|
||||||
lib->plugins->unload(lib->plugins);
|
lib->plugins->unload(lib->plugins);
|
||||||
DESTROY_IF(this->public.attributes);
|
DESTROY_IF(this->public.attributes);
|
||||||
DESTROY_IF(this->kernel_handler);
|
DESTROY_IF(this->kernel_handler);
|
||||||
|
|||||||
Reference in New Issue
Block a user