Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbhatman1441 <blackhat1441@protonmail.com>2023-07-04 15:15:58 +0300
committerbhatman1441 <blackhat1441@protonmail.com>2023-07-04 15:15:58 +0300
commitdb454c9fd227266c47c2d289ee65fa3f43927791 (patch)
tree551d279916d7aebd5b64b7d127fe0f4f405d5b68 /src
parentea2fa164cf2de8f503be396bb3373b541ce77cde (diff)
Fix g_free locations in remmina_pref_init
Diffstat (limited to 'src')
-rw-r--r--src/remmina_pref.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/remmina_pref.c b/src/remmina_pref.c
index d31cb29aa..0b8238ee3 100644
--- a/src/remmina_pref.c
+++ b/src/remmina_pref.c
@@ -244,6 +244,8 @@ void remmina_pref_init(void)
"remmina", filename, NULL);
remmina_pref_file_do_copy(remmina_pref_path, user_config_path);
g_dir_close(dir);
+ g_free(remmina_pref_path);
+ g_free(user_config_path);
}
/* /usr/local/etc/remmina */
@@ -259,14 +261,14 @@ void remmina_pref_init(void)
user_config_path = g_build_path("/", g_get_user_config_dir(),
"remmina", filename, NULL);
remmina_pref_file_do_copy(remmina_pref_path, user_config_path);
+ g_free(remmina_pref_path);
+ g_free(user_config_path);
}
g_free(remmina_dir), remmina_dir = NULL;
+ g_dir_close(dir);
}
}
-
- g_free(remmina_pref_path);
- g_free(user_config_path);
-
+
/* The last case we use the home ~/.config/remmina */
if (remmina_dir != NULL)
g_free(remmina_dir), remmina_dir = NULL;