[epiphany/mcatanzaro/leaks: 4/7] embed-shell: fix leak in get_global_gsb_service
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/leaks: 4/7] embed-shell: fix leak in get_global_gsb_service
- Date: Fri, 7 May 2021 19:29:32 +0000 (UTC)
commit 072660e75f0e6f4c236831c5d2b17f2eb3170fce
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue May 4 13:02:09 2021 -0500
embed-shell: fix leak in get_global_gsb_service
This is a one-time leak, but still a leak. Found by valgrind.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/958>
embed/ephy-embed-shell.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index f930b5c32..a717836c1 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -639,8 +639,9 @@ ephy_embed_shell_get_global_gsb_service (EphyEmbedShell *shell)
if (!priv->global_gsb_service) {
g_autofree char *db_path = NULL;
+ g_autofree char *default_cache_dir = ephy_default_cache_dir ();
- db_path = g_build_filename (ephy_default_cache_dir (), EPHY_GSB_FILE, NULL);
+ db_path = g_build_filename (default_cache_dir, EPHY_GSB_FILE, NULL);
priv->global_gsb_service = ephy_gsb_service_new (GSB_API_KEY, db_path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]