plugin_unregister(): Stop I/O watcher before free():ing watcher

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2018-01-18 18:35:18 +01:00
1 parent 92b1d882e5
commit 5354a57313
1 file changed
+3
+3
View File
@@ -108,6 +108,9 @@ int plugin_register(plugin_t *plugin)
/* Not called, at the moment plugins cannot be unloaded. */
int plugin_unregister(plugin_t *plugin)
{
if (is_io_plugin(plugin))
uev_io_stop(&plugin->watcher);
#ifndef ENABLE_STATIC
TAILQ_REMOVE(&plugins, plugin, link);