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: 3988046de538 ("hostapd: Dynamic MAC ACL management over control interface")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
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);