diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 8075b6dac..6ba5aae1b 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -217,8 +217,10 @@ 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);