memcached plugin: Use hostname_g when reading localhost.
[collectd.git] / src / mic.c
index ec92c8b..8d7871b 100644 (file)
--- a/src/mic.c
+++ b/src/mic.c
@@ -20,6 +20,7 @@
  **/
 
 #include "collectd.h"
+
 #include "plugin.h"
 #include "common.h"
 #include "utils_ignorelist.h"
@@ -398,7 +399,9 @@ static int mic_read (void)
 static int mic_shutdown (void)
 {
        if (mic_handle)
-       MicCloseAPI(&mic_handle);
+               MicCloseAPI(&mic_handle);
+       mic_handle = NULL;
+
        return (0);
 }