Code

netapp plugin: Add a shutdown callback.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 29 Sep 2009 14:51:45 +0000 (16:51 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 29 Sep 2009 14:51:45 +0000 (16:51 +0200)
src/netapp.c

index aab30e58e636860e4385cc4aa536f2a506c6566a..9bfaaa668ee1a05d62eca08ebc60c5cb99d7aa9e 100644 (file)
@@ -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 : */