From: Carlos Garcia Campos Date: Tue, 12 Jun 2007 16:48:08 +0000 (+0000) Subject: Fix memory leak. X-Git-Tag: EVINCE_0_9_1~13 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=6af898f7cec050d05fb795310ea184b40db71645;p=evince.git Fix memory leak. 2007-06-12 Carlos Garcia Campos * shell/ev-window-title.c: (ev_window_title_update): Fix memory leak. svn path=/trunk/; revision=2496 --- diff --git a/ChangeLog b/ChangeLog index d378f2b8..35fa4305 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-06-12 Carlos Garcia Campos + + * shell/ev-window-title.c: (ev_window_title_update): + + Fix memory leak. + 2007-06-09 Carlos Garcia Campos * shell/ev-view.c: (draw_loading_text): diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c index 5702fb32..3a7d908d 100644 --- a/shell/ev-window-title.c +++ b/shell/ev-window-title.c @@ -120,12 +120,10 @@ ev_window_title_update (EvWindowTitle *window_title) if (title && window_title->uri) { ev_window_title_sanitize_extension (window_title, &title); - } else { - if (window_title->uri) { - title = get_filename_from_uri (window_title->uri); - } else { - title = g_strdup (_("Document Viewer")); - } + } else if (window_title->uri) { + title = get_filename_from_uri (window_title->uri); + } else if (!title) { + title = g_strdup (_("Document Viewer")); } for (p = title; *p; ++p) {