[epiphany] Fix memory leak in ephy-about-handler
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Fix memory leak in ephy-about-handler
- Date: Sun, 21 Jul 2019 16:54:27 +0000 (UTC)
commit 5ed235c5450cadf60695e1f98c5186023f080371
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Sun Jul 21 13:49:57 2019 +0200
Fix memory leak in ephy-about-handler
embed/ephy-about-handler.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c
index 0ff3d7f20..a03fa5c7f 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -396,7 +396,8 @@ history_service_query_urls_cb (EphyHistoryService *history,
for (l = urls; l; l = g_list_next (l)) {
EphyHistoryURL *url = (EphyHistoryURL *)l->data;
const char *snapshot;
- char *thumbnail_style = NULL;
+ g_autofree char *thumbnail_style = NULL;
+ g_autofree char *markup = NULL;
snapshot = ephy_snapshot_service_lookup_cached_snapshot_path (snapshot_service, url->url);
if (snapshot)
@@ -404,15 +405,15 @@ history_service_query_urls_cb (EphyHistoryService *history,
else
ephy_embed_shell_schedule_thumbnail_update (shell, url);
+ markup = g_markup_escape_text (url->title, -1);
g_string_append_printf (data_str,
"<a class=\"overview-item\" title=\"%s\" href=\"%s\">"
" <div class=\"overview-close-button\" title=\"%s\">✖</div>"
" <span class=\"overview-thumbnail\"%s></span>"
" <span class=\"overview-title\">%s</span>"
"</a>",
- g_markup_escape_text (url->title, -1), url->url, _("Remove from overview"),
+ markup, url->url, _("Remove from overview"),
thumbnail_style ? thumbnail_style : "", url->title);
- g_free (thumbnail_style);
}
data_str = g_string_append (data_str,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]