---
src/hotspot.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
-v2:
* Just fail if HESSID doesn't parse
diff --git a/src/hotspot.c b/src/hotspot.c
index 20ebb2fd..e3a7a07a 100644
--- a/src/hotspot.c
+++ b/src/hotspot.c
@@ -342,7 +342,11 @@ static struct hs20_config *hs20_config_new(struct l_settings
*settings,
config = l_new(struct hs20_config, 1);
if (hessid_str) {
- util_string_to_address(hessid_str, config->hessid);
+ if (!util_string_to_address(hessid_str, config->hessid)) {
+ l_error("Invalid HESSID in settings");
+ goto free_values;
+ }
+
l_free(hessid_str);
}
@@ -423,6 +427,8 @@ static void hs20_dir_watch_cb(const char *filename,
l_queue_push_head(hs20_settings, config);
+ l_settings_free(new);
+
break;
case L_DIR_WATCH_EVENT_REMOVED:
config = l_queue_remove_if(hs20_settings, match_filename,
@@ -453,6 +459,8 @@ static void hs20_dir_watch_cb(const char *filename,
known_network_update(&config->super, new, connected_time);
+ l_settings_free(new);
+
break;
case L_DIR_WATCH_EVENT_ACCESSED:
break;
--
2.17.1
Show replies by date