summaryrefslogtreecommitdiff
path: root/shell/ev-window-title.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-02-23 13:40:29 +0100
committerStefano Karapetsas <[email protected]>2014-02-23 13:40:29 +0100
commit359c1ad6bd116ca7b0f80a3e0a46fc4268b8cf29 (patch)
tree1854b05cc0f2fb5e1d687659d22a11f3ca2458d9 /shell/ev-window-title.c
parentec9fb4ab1005d88a10ec17b83ce8fe8a986ec82f (diff)
downloadatril-359c1ad6bd116ca7b0f80a3e0a46fc4268b8cf29.tar.bz2
atril-359c1ad6bd116ca7b0f80a3e0a46fc4268b8cf29.tar.xz
Fix double free
Diffstat (limited to 'shell/ev-window-title.c')
-rw-r--r--shell/ev-window-title.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c
index 7a61d962..7b8c45e8 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);
+ tmp_title = g_strdup_printf ("%s — %s", filename, title);
- g_free (tmp_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) {