[gnome-commander] Copy a string instead of freeing it which should not happen



commit e55e9b7de6b819e659db666d9442b36be3151c7e
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Thu Feb 7 22:42:57 2019 +0100

    Copy a string instead of freeing it which should not happen

 src/gnome-cmd-data.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index d8e9b361..e5e3ca79 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -1735,7 +1735,7 @@ void GnomeCmdData::save_devices_via_gsettings()
             auto *device = GNOME_CMD_CON_DEVICE (devices->data);
             if (device && !gnome_cmd_con_device_get_autovol (device))
             {
-                gchar *icon_path = (gchar *) gnome_cmd_con_device_get_icon_path (device);
+                gchar *icon_path = g_strdup (gnome_cmd_con_device_get_icon_path (device));
                 if (!icon_path || icon_path[0] == '\0')
                     icon_path = g_strdup ("");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]