[evince] shell: Fix double free



commit e2147ba4018aeeaac89fa900ae4bc26ee8ee69b4
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Mon Dec 20 20:38:13 2010 +0100

    shell: Fix double free

 shell/ev-window-title.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c
index 9e26c21..94dd333 100644
--- a/shell/ev-window-title.c
+++ b/shell/ev-window-title.c
@@ -142,14 +142,15 @@ ev_window_title_update (EvWindowTitle *window_title)
 	}
 
 	if (title && window_title->uri) {
-		char *tmp_title = title;
+		char *tmp_title;
 		char *filename = get_filename_from_uri (window_title->uri);
 
 		ev_window_title_sanitize_title (window_title, &title);
-		title = g_strdup_printf ("%s â?? %s", filename, title);
-		
-		g_free (tmp_title);
-		g_free (filename);
+		tmp_title = g_strdup_printf ("%s â?? %s", filename, title);
+                g_free (title);
+                g_free (filename);
+
+                title = tmp_title;
 	} else if (window_title->uri) {
 		title = get_filename_from_uri (window_title->uri);
 	} else if (!title) {



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