[gnome-commander/get_rid_of_xml] Free memory when loading dir history
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/get_rid_of_xml] Free memory when loading dir history
- Date: Mon, 3 Dec 2018 15:55:17 +0000 (UTC)
commit d38fc137310092c12c0af2a11ae2a9d8518d048b
Author: Uwe Scholz <u scholz83 gmx de>
Date: Sat Dec 1 20:31:19 2018 +0100
Free memory when loading dir history
src/gnome-cmd-data.cc | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index f1b674d3..c5e7271a 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -2659,6 +2659,8 @@ inline void GnomeCmdData::load_directory_history()
for (GList *i=directories; i; i=i->next)
{
gnome_cmd_con_get_dir_history (get_home_con())->add((const gchar *) i->data);
+ // the add method above copies the char strings
+ g_free(i->data);
}
g_list_free(directories);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]