From: Florian Forster Date: Tue, 29 Sep 2009 14:51:45 +0000 (+0200) Subject: netapp plugin: Add a shutdown callback. X-Git-Tag: collectd-4.9.0~73^2~8 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=09a871661a0a5c7a65729a6c18a19f3a909777c6;p=collectd.git netapp plugin: Add a shutdown callback. --- diff --git a/src/netapp.c b/src/netapp.c index aab30e58..9bfaaa66 100644 --- a/src/netapp.c +++ b/src/netapp.c @@ -2402,10 +2402,19 @@ static int cna_read (void) { /* {{{ */ return 0; } /* }}} int cna_read */ +static int cna_shutdown (void) /* {{{ */ +{ + free_host_config (global_host_config); + global_host_config = NULL; + + return (0); +} /* }}} int cna_shutdown */ + void module_register(void) { plugin_register_complex_config("netapp", cna_config); plugin_register_init("netapp", cna_init); plugin_register_read("netapp", cna_read); + plugin_register_shutdown("netapp", cna_shutdown); } /* vim: set sw=2 ts=2 noet fdm=marker : */