aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2016-10-27 12:18:24 (GMT)
committerJouni Malinen <j@w1.fi>2016-10-29 16:11:59 (GMT)
commit5cb59370d5795ecb4f13a5e3d429a9ba3d7732b2 (patch)
treef6b20302342f077b2c6136fcbbbe20eeb923af55 /hostapd
parentf5ec346902ee23477682647d98d2c2f4dea91501 (diff)
downloadhostap-5cb59370d5795ecb4f13a5e3d429a9ba3d7732b2.zip
hostap-5cb59370d5795ecb4f13a5e3d429a9ba3d7732b2.tar.gz
hostap-5cb59370d5795ecb4f13a5e3d429a9ba3d7732b2.tar.bz2
hostapd: Clear location configuration when it is reset
In case that LCI or location civic configuration is cleared, free the buffer holding the corresponding information to avoid cases that the information is considered as valid/useful. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 8e7bcc7..4b49672 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3493,9 +3493,17 @@ static int hostapd_config_fill(struct hostapd_config *conf,
} else if (os_strcmp(buf, "lci") == 0) {
wpabuf_free(conf->lci);
conf->lci = wpabuf_parse_bin(pos);
+ if (conf->lci && wpabuf_len(conf->lci) == 0) {
+ wpabuf_free(conf->lci);
+ conf->lci = NULL;
+ }
} else if (os_strcmp(buf, "civic") == 0) {
wpabuf_free(conf->civic);
conf->civic = wpabuf_parse_bin(pos);
+ if (conf->civic && wpabuf_len(conf->civic) == 0) {
+ wpabuf_free(conf->civic);
+ conf->civic = NULL;
+ }
} else if (os_strcmp(buf, "rrm_neighbor_report") == 0) {
if (atoi(pos))
bss->radio_measurements[0] |=