Code

netapp plugin: Don't access a struct after freeing it.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Wed, 30 Sep 2009 06:11:10 +0000 (08:11 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Wed, 30 Sep 2009 06:11:10 +0000 (08:11 +0200)
Thanks Sven :)

src/netapp.c

index 9bfaaa668ee1a05d62eca08ebc60c5cb99d7aa9e..ab01b7458a63449879a484c34f1bfb35362d1f8e 100644 (file)
@@ -384,11 +384,11 @@ static void free_host_config (host_config_t *hc) /* {{{ */
        free_cfg_volume_usage (hc->cfg_volume_usage);
        free_cfg_system (hc->cfg_system);
 
-       sfree (hc);
-
        if (hc->srv != NULL)
                na_server_close (hc->srv);
 
+       sfree (hc);
+
        free_host_config (next);
 } /* }}} void free_host_config */