aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/config.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-12-31 11:05:51 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-31 11:07:13 (GMT)
commit54e06b4ffba38c091b1e39de39cd771d6c9031c8 (patch)
tree34b4eb63f4589ba2f6dcc6eab85e181934177fd5 /wpa_supplicant/config.c
parent68bb0077434b5f8d3f7129b1f225a3cc1047587c (diff)
downloadhostap-54e06b4ffba38c091b1e39de39cd771d6c9031c8.zip
hostap-54e06b4ffba38c091b1e39de39cd771d6c9031c8.tar.gz
hostap-54e06b4ffba38c091b1e39de39cd771d6c9031c8.tar.bz2
D-Bus: Fix memory leak on P2PDeviceConfig::VendorExtension
The wps_vendor_ext array can be set using D-Bus Set(P2PDeviceConfig) with the VendorExtension key in the dictionary. However, there was no code for freeing the allocated memory when the interface is removed. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/config.c')
-rw-r--r--wpa_supplicant/config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index f478a04..4ebf684 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2161,6 +2161,7 @@ void wpa_config_free(struct wpa_config *config)
{
struct wpa_ssid *ssid, *prev = NULL;
struct wpa_cred *cred, *cprev;
+ int i;
ssid = config->ssid;
while (ssid) {
@@ -2179,6 +2180,8 @@ void wpa_config_free(struct wpa_config *config)
wpa_config_flush_blobs(config);
wpabuf_free(config->wps_vendor_ext_m1);
+ for (i = 0; i < MAX_WPS_VENDOR_EXT; i++)
+ wpabuf_free(config->wps_vendor_ext[i]);
os_free(config->ctrl_interface);
os_free(config->ctrl_interface_group);
os_free(config->opensc_engine_path);