[gnome-commander/get_rid_of_xml] Free memory of path string in gnome_cmd_dir_list_files function



commit a7d7828ec1a57f0ac78018c01376634737823620
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sun Dec 2 22:07:24 2018 +0100

    Free memory of path string in gnome_cmd_dir_list_files function

 src/gnome-cmd-dir.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/gnome-cmd-dir.cc b/src/gnome-cmd-dir.cc
index 39962b68..6ca880ca 100644
--- a/src/gnome-cmd-dir.cc
+++ b/src/gnome-cmd-dir.cc
@@ -552,11 +552,13 @@ void gnome_cmd_dir_list_files (GnomeCmdDir *dir, gboolean visprog)
 
     if (!dir->priv->files || gnome_cmd_dir_is_local (dir))
     {
+        gchar *path = GNOME_CMD_FILE (dir)->get_path();
         DEBUG ('l', "relisting files for 0x%x %s %d\n",
                dir,
-               GNOME_CMD_FILE (dir)->get_path(),
+               path,
                visprog);
         gnome_cmd_dir_relist_files (dir, visprog);
+        g_free(path);
     }
     else
         g_signal_emit (dir, signals[LIST_OK], 0, dir->priv->files);


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