Fix SVACE issues,(WGID: 2654,2649,2655,2650) 81/140781/2
authorNiraj Kumar Goit <niraj.g@samsung.com>
Wed, 26 Jul 2017 09:00:25 +0000 (14:30 +0530)
committerNiraj Kumar Goit <niraj.g@samsung.com>
Thu, 27 Jul 2017 09:40:08 +0000 (15:10 +0530)
Change-Id: I4fd91bfb764c1520dd3fed94ad7aaaf9cc4f82be
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
src/wifi-config.c

index 2023fd9..c90e77c 100755 (executable)
@@ -288,8 +288,8 @@ static gboolean _load_configuration(const gchar *config_id, struct wifi_config *
        config->name = g_key_file_get_string(keyfile, group_name, WIFI_CONFIG_NAME, NULL);
        DBG("name [%s]", config->name);
 
-       ret = __get_security_type(config_id, &config->security_type);
-       if (ret != TRUE) {
+       __get_security_type(config_id, &config->security_type);
+       if (config->security_type == NULL) {
                ERR("Fail to _get_security_type");
                g_key_file_free(keyfile);
                g_free(group_name);
@@ -784,6 +784,7 @@ gboolean handle_save_configuration(Wifi *wifi, GDBusMethodInvocation *context,
        }
 
        g_key_file_free(keyfile);
+       g_free(group_name);
        g_free(conf->name);
        g_free(conf->ssid);
        g_free(conf->passphrase);
@@ -1070,6 +1071,7 @@ gboolean handle_save_eap_configuration(Wifi *wifi, GDBusMethodInvocation *contex
        }
 
        g_key_file_free(keyfile);
+       g_free(group_name);
        __free_wifi_configuration(conf);
 
        g_variant_iter_free(iter);