[gnome-commander/get_rid_of_xml] Free allocated memory in save_tabs_via_gsettings
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/get_rid_of_xml] Free allocated memory in save_tabs_via_gsettings
- Date: Thu, 22 Nov 2018 07:36:39 +0000 (UTC)
commit dee914c4f02155e4aa81b03e2e473cea3dedcda5
Author: Uwe Scholz <u scholz83 gmx de>
Date: Wed Nov 21 22:42:58 2018 +0100
Free allocated memory in save_tabs_via_gsettings
src/gnome-cmd-data.cc | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 70c58c13..cae3a9ea 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -1822,12 +1822,14 @@ static void save_tabs_via_gsettings(GSettings *gSettings, const char *gSettingsK
GnomeCmdFileList *fl = (GnomeCmdFileList *) gtk_bin_get_child (GTK_BIN (i->data));
if (GNOME_CMD_FILE_LIST (fl) && gnome_cmd_con_is_local (fl->con))
{
+ gchar* realPath = GNOME_CMD_FILE (fl->cwd)->get_real_path();
g_variant_builder_add (&gVariantBuilder, GCMD_SETTINGS_FILE_LIST_TAB_FORMAT_STRING,
- GNOME_CMD_FILE (fl->cwd)->get_real_path(),
+ realPath,
(guchar) fileSelectorId,
fl->get_sort_column(),
fl->get_sort_order(),
fl->locked);
+ g_free(realPath);
}
}
else
@@ -1837,12 +1839,14 @@ static void save_tabs_via_gsettings(GSettings *gSettings, const char *gSettingsK
GnomeCmdFileList *fl = (GnomeCmdFileList *) gtk_bin_get_child (GTK_BIN (i->data));
if (GNOME_CMD_FILE_LIST (fl) && gnome_cmd_con_is_local (fl->con) &&
(fl==gnomeCmdFileSelector.file_list() || fl->locked))
{
+ gchar* realPath = GNOME_CMD_FILE (fl->cwd)->get_real_path();
g_variant_builder_add (&gVariantBuilder, GCMD_SETTINGS_FILE_LIST_TAB_FORMAT_STRING,
- GNOME_CMD_FILE (fl->cwd)->get_real_path(),
+ realPath,
(guchar) fileSelectorId,
fl->get_sort_column(),
fl->get_sort_order(),
fl->locked);
+ g_free(realPath);
}
}
else
@@ -1850,12 +1854,14 @@ static void save_tabs_via_gsettings(GSettings *gSettings, const char *gSettingsK
GnomeCmdFileList *fl = (GnomeCmdFileList *) gtk_bin_get_child (GTK_BIN (i->data));
if (GNOME_CMD_FILE_LIST (fl) && gnome_cmd_con_is_local (fl->con) && fl->locked)
{
+ gchar* realPath = GNOME_CMD_FILE (fl->cwd)->get_real_path();
g_variant_builder_add (&gVariantBuilder, GCMD_SETTINGS_FILE_LIST_TAB_FORMAT_STRING,
- GNOME_CMD_FILE (fl->cwd)->get_real_path(),
+ realPath,
(guchar) fileSelectorId,
fl->get_sort_column(),
fl->get_sort_order(),
fl->locked);
+ g_free(realPath);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]