summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 635da6f)
raw | patch | inline | side by side (parent: 635da6f)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 29 Aug 2009 12:57:18 +0000 (14:57 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 29 Aug 2009 12:57:18 +0000 (14:57 +0200) |
A segfault in case the named plugin does not exists has been fixed in the
upstream collectd-4.7 branch.
upstream collectd-4.7 branch.
debian/patches/plugin-fix-unregister.dpatch | patch | blob | history |
diff --git a/debian/patches/plugin-fix-unregister.dpatch b/debian/patches/plugin-fix-unregister.dpatch
index 7e12cebf8cc36151b08ac9128115570ccb551baf..3bb441028b41e7599cb8598c9b55fdc7e24da3de 100755 (executable)
} /* int plugin_register_complex_read */
int plugin_register_write (const char *name,
-@@ -816,12 +871,37 @@ int plugin_unregister_init (const char *name)
+@@ -816,12 +871,45 @@ int plugin_unregister_init (const char *name)
return (plugin_unregister (list_init, name));
}
+ }
+
+ le = llist_search (read_list, name);
++ if (le == NULL)
++ {
++ pthread_mutex_unlock (&read_lock);
++ WARNING ("plugin_unregister_read: No such read function: %s",
++ name);
++ return (-ENOENT);
++ }
++
+ llist_remove (read_list, le);
+
+ rf = le->value;
int plugin_unregister_write (const char *name)
{
-@@ -1093,6 +1173,12 @@ void plugin_shutdown_all (void)
+@@ -1093,6 +1181,12 @@ void plugin_shutdown_all (void)
stop_read_threads ();
destroy_all_callbacks (&list_init);