Fix memory leak in config freeing
authorJouni Malinen <jouni.malinen@atheros.com>
Mon, 21 Dec 2009 20:22:49 +0000 (22:22 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 21 Dec 2009 20:22:49 +0000 (22:22 +0200)
Both supported_rates and basic_rates arrays must be freed when freeing
hostapd configuration.

hostapd/config.c

index 7f50dd9..1e89ad3 100644 (file)
@@ -2485,6 +2485,8 @@ void hostapd_config_free(struct hostapd_config *conf)
        for (i = 0; i < conf->num_bss; i++)
                hostapd_config_free_bss(&conf->bss[i]);
        os_free(conf->bss);
+       os_free(conf->supported_rates);
+       os_free(conf->basic_rates);
 
        os_free(conf);
 }