Skip to content

Commit

Permalink
EomMetadataSidebar: Fix leaked strings
Browse files Browse the repository at this point in the history
  • Loading branch information
fxri authored and raveit65 committed Aug 1, 2018
1 parent a29a5d1 commit ece3c97
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/eom-metadata-sidebar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ece3c97

Please sign in to comment.