[eog] EogMetadataSidebar: Fix leaked strings
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogMetadataSidebar: Fix leaked strings
- Date: Thu, 15 Jan 2015 22:34:57 +0000 (UTC)
commit fec0939df2d96ea2eac3e5ee68540a262ea99302
Author: Felix Riemann <friemann gnome org>
Date: Thu Jan 15 23:27:51 2015 +0100
EogMetadataSidebar: Fix leaked strings
src/eog-metadata-sidebar.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/eog-metadata-sidebar.c b/src/eog-metadata-sidebar.c
index 033c754..782aedb 100644
--- a/src/eog-metadata-sidebar.c
+++ b/src/eog-metadata-sidebar.c
@@ -93,6 +93,7 @@ eog_metadata_sidebar_update_general_section (EogMetadataSidebar *sidebar)
EogImage *img = priv->image;
GFile *file, *parent_file;
GFileInfo *file_info;
+ gchar *basename, *baseuri;
gchar *str;
goffset bytes;
gint width, height;
@@ -137,10 +138,15 @@ eog_metadata_sidebar_update_general_section (EogMetadataSidebar *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);
g_object_unref (parent_file);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]