[Xfce4-commits] <thunar:master> Fix segfault in file reload.
Nick Schermer
noreply at xfce.org
Fri Nov 26 14:34:01 CET 2010
Updating branch refs/heads/master
to 4162611e7170f67700b987d2cdbfd9abff7abe32 (commit)
from e014ec8b095e9fe454edd5506cffacf6648095e0 (commit)
commit 4162611e7170f67700b987d2cdbfd9abff7abe32
Author: Nick Schermer <nick at xfce.org>
Date: Fri Nov 26 14:31:00 2010 +0100
Fix segfault in file reload.
Thunar crashed a number of times here when using the
pathbar, looking for a file that was constantly rewritten.
Valgrind reported a double free on file->display_name and
invalid reads as a result of that.
thunar/thunar-file.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 6a341ba..dc0f59b 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -723,13 +723,18 @@ thunar_file_load (ThunarFile *file,
/* free the custom icon name */
g_free (file->custom_icon_name);
+ file->custom_icon_name = NULL;
/* free display name and basename */
g_free (file->display_name);
+ file->display_name = NULL;
+
g_free (file->basename);
+ file->basename = NULL;
/* free thumbnail path */
g_free (file->thumbnail_path);
+ file->thumbnail_path = NULL;
/* assume the file is mounted by default */
file->is_mounted = TRUE;
More information about the Xfce4-commits
mailing list