[epiphany/mcatanzaro/leaks: 1/4] embed-shell: fix leak in get_global_gsb_service
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/leaks: 1/4] embed-shell: fix leak in get_global_gsb_service
- Date: Tue, 4 May 2021 20:08:19 +0000 (UTC)
commit be76ba95f451f3872b047ba4c417a527172b0746
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.
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..f6f52c09a 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]