[collectd] [PATCH] unixsock plugin: Do not unregister a write-callback in us_shutdown().

Sebastian Harl sh at tokkee.org
Mon Mar 31 11:31:38 CEST 2008

The unixsock plugin no longer registers a write-callback. Basically,
unregistering a non-existent callback does not do any harm, However, if no
write-callback has been registered at all, the appropriate linked list has
never been created and the process will segfault when trying to access it.

Signed-off-by: Sebastian Harl <sh at tokkee.org>
 src/unixsock.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/unixsock.c b/src/unixsock.c
index 80198ce..025c91d 100644
--- a/src/unixsock.c
+++ b/src/unixsock.c
@@ -382,7 +382,6 @@ static int us_shutdown (void)
 	plugin_unregister_init ("unixsock");
-	plugin_unregister_write ("unixsock");
 	plugin_unregister_shutdown ("unixsock");
 	return (0);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080331/3f069e36/attachment.pgp 

More information about the collectd mailing list