diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 2a4acf241..73dffe2c1 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -220,7 +220,7 @@ static u8 * hostapd_eid_country(struct hostapd_data *hapd, u8 *eid, continue; /* can use same entry */ } - if (start) { + if (start && prev) { pos = hostapd_eid_country_add(pos, end, chan_spacing, start, prev); start = NULL;