mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
Fix a resource leak on hostapd maclist parsing error path
The open file needs to be closed in error case. The conversion to using
a new helper function (hostapd_add_acl_maclist) somehow managed to
remove the neede fclose(f) call. Bring it back to fix this.
Fixes: 3988046de5
("hostapd: Dynamic MAC ACL management over control interface")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
80da433507
commit
0fa669bcae
@ -217,9 +217,11 @@ static int hostapd_config_read_maclist(const char *fname,
|
||||
if (*pos != '\0')
|
||||
vlan_id = atoi(pos);
|
||||
|
||||
if (hostapd_add_acl_maclist(acl, num, vlan_id, addr) < 0)
|
||||
if (hostapd_add_acl_maclist(acl, num, vlan_id, addr) < 0) {
|
||||
fclose(f);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user