Fix memory leak (WGID 173557, 173558)
[platform/core/connectivity/net-config.git] / src / wifi-config.c
index efcfd22..aa2ab05 100755 (executable)
@@ -432,6 +432,7 @@ static gboolean _set_field(const gchar *config_id, const gchar *key, const gchar
        keyfile = __get_configuration_keyfile(group_name);
        if (keyfile == NULL) {
                ERR("Fail to __get_configuration_keyfile");
+               g_free(group_name);
                return FALSE;
        }
 
@@ -491,6 +492,7 @@ static gboolean _get_field(const gchar *config_id, const gchar *key, gchar **val
        keyfile = __get_configuration_keyfile(group_name);
        if (keyfile == NULL) {
                ERR("Fail to __get_configuration_keyfile");
+               g_free(group_name);
                return FALSE;
        }