summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Riemann <[email protected]>2015-01-15 23:27:51 +0100
committerraveit65 <[email protected]>2018-08-01 12:20:45 +0200
commitece3c970b4cfb6cbb8f02cbb2d78176bb2a9461f (patch)
tree30091a77c6eb1cdf39d466b6679789c0c27cdda0
parenta29a5d12245c7dde8c8e3e1bb430e9414b2b1cba (diff)
downloadeom-ece3c970b4cfb6cbb8f02cbb2d78176bb2a9461f.tar.bz2
eom-ece3c970b4cfb6cbb8f02cbb2d78176bb2a9461f.tar.xz
EomMetadataSidebar: Fix leaked strings
origin commit: https://gitlab.gnome.org/GNOME/eog/commit/fec0939
-rw-r--r--src/eom-metadata-sidebar.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/eom-metadata-sidebar.c b/src/eom-metadata-sidebar.c
index 5c0e33a..ccca3bf 100644
--- a/src/eom-metadata-sidebar.c
+++ b/src/eom-metadata-sidebar.c
@@ -98,6 +98,7 @@ eom_metadata_sidebar_update_general_section (EomMetadataSidebar *sidebar)
EomImage *img = priv->image;
GFile *file, *parent_file;
GFileInfo *file_info;
+ gchar *basename, *baseuri;
gchar *str;
goffset bytes;
gint width, height;
@@ -142,10 +143,15 @@ eom_metadata_sidebar_update_general_section (EomMetadataSidebar *sidebar)
/* file is root directory itself */
parent_file = g_object_ref (file);
}
- str = g_file_get_basename (parent_file);
- str = g_markup_printf_escaped ("<a href=\"%s\">%s</a>", g_file_get_uri (parent_file), str);
+ basename = g_file_get_basename (parent_file);
+ baseuri = g_file_get_uri (parent_file);
+ str = g_markup_printf_escaped ("<a href=\"%s\">%s</a>",
+ baseuri,
+ basename);
gtk_label_set_markup (GTK_LABEL (priv->folder_label), str);
g_free (str);
+ g_free (baseuri);
+ g_free (basename);
str = g_file_get_path (parent_file);
gtk_widget_set_tooltip_text (GTK_WIDGET (priv->folder_label), str);