mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 10:18:21 -05:00
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>
This commit is contained in:
parent
68bb007743
commit
54e06b4ffb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user