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:43:52 +0300
committerbhatman1441 <blackhat1441@protonmail.com>2023-07-04 15:43:52 +0300
commit345b5b9b65317e5b2a4fe5c661064574709fa10d (patch)
tree4574b424a08d4d5bd706fd47142a5ca1d0cd020b /src
parent93fc4ae86b71c14737dbfe2f472d140136c7ebe3 (diff)
parentdb454c9fd227266c47c2d289ee65fa3f43927791 (diff)
Merge branch 'fix-memory-leaks' into 'master'
Fix snap crash See merge request Remmina/Remmina!2512
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;