From: Sebastian Harl Date: Mon, 31 Mar 2008 09:31:38 +0000 (+0200) Subject: unixsock plugin: Do not unregister a write-callback in us_shutdown(). X-Git-Tag: collectd-4.2.7~10 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=cc198156a5fbf657481c29329982adac3878bee4;p=collectd.git unixsock plugin: Do not unregister a write-callback in us_shutdown(). 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 Signed-off-by: Florian Forster --- diff --git a/src/unixsock.c b/src/unixsock.c index f8dcc5ba..f8c9fbfd 100644 --- a/src/unixsock.c +++ b/src/unixsock.c @@ -752,7 +752,6 @@ static int us_shutdown (void) } plugin_unregister_init ("unixsock"); - plugin_unregister_write ("unixsock"); plugin_unregister_shutdown ("unixsock"); return (0);