Check SSID when loading wifi configuration file 46/274646/1 submit/tizen/20220504.090404
authorJaehyun Kim <jeik01.kim@samsung.com>
Wed, 4 May 2022 06:05:37 +0000 (15:05 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Wed, 4 May 2022 06:05:37 +0000 (15:05 +0900)
Change-Id: Ida477975e478112af2c620ec9f4489673a130609
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
src/wifi-config.c

index acf7bf13dafa38f4161651c31ccac59fd89828e1..6fa174c50e8091b05c4fae8f46314058c7448c4a 100755 (executable)
@@ -334,6 +334,13 @@ static gboolean _load_configuration(const gchar *interface_name,
        config->name = g_key_file_get_string(keyfile, group_name, WIFI_CONFIG_NAME, NULL);
        DBG("name [%s]", config->name);
 
+       if (config->name == NULL) {
+               ERR("Fail to get Name of [%s]", group_name);
+               g_key_file_free(keyfile);
+               g_free(group_name);
+               return FALSE;
+       }
+
        __get_security_type(config_id, &config->security_type);
        if (config->security_type == NULL) {
                ERR("Fail to _get_security_type");