Skip to content

Commit ece3c97

Browse files
fxriraveit65
authored andcommitted
EomMetadataSidebar: Fix leaked strings
origin commit: https://gitlab.gnome.org/GNOME/eog/commit/fec0939
1 parent a29a5d1 commit ece3c97

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/eom-metadata-sidebar.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ eom_metadata_sidebar_update_general_section (EomMetadataSidebar *sidebar)
9898
EomImage *img = priv->image;
9999
GFile *file, *parent_file;
100100
GFileInfo *file_info;
101+
gchar *basename, *baseuri;
101102
gchar *str;
102103
goffset bytes;
103104
gint width, height;
@@ -142,10 +143,15 @@ eom_metadata_sidebar_update_general_section (EomMetadataSidebar *sidebar)
142143
/* file is root directory itself */
143144
parent_file = g_object_ref (file);
144145
}
145-
str = g_file_get_basename (parent_file);
146-
str = g_markup_printf_escaped ("<a href=\"%s\">%s</a>", g_file_get_uri (parent_file), str);
146+
basename = g_file_get_basename (parent_file);
147+
baseuri = g_file_get_uri (parent_file);
148+
str = g_markup_printf_escaped ("<a href=\"%s\">%s</a>",
149+
baseuri,
150+
basename);
147151
gtk_label_set_markup (GTK_LABEL (priv->folder_label), str);
148152
g_free (str);
153+
g_free (baseuri);
154+
g_free (basename);
149155

150156
str = g_file_get_path (parent_file);
151157
gtk_widget_set_tooltip_text (GTK_WIDGET (priv->folder_label), str);

0 commit comments

Comments
 (0)