[epiphany/mcatanzaro/leaks] Fix some user content and user scripts leaks
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/leaks] Fix some user content and user scripts leaks
- Date: Fri, 15 Oct 2021 21:34:07 +0000 (UTC)
commit 719f77288973180ed004cb5422942048f9db4234
Author: Michael Catanzaro <mcatanzaro redhat com>
Date: Fri Oct 15 16:33:12 2021 -0500
Fix some user content and user scripts leaks
embed/ephy-web-view.c | 6 +++---
src/webextension/ephy-web-extension-manager.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index f53a6a734..0c9eccee3 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -4282,7 +4282,7 @@ ephy_web_view_class_init (EphyWebViewClass *klass)
static void
ephy_web_view_ucm_add_custom_scripts (WebKitUserContentManager *ucm)
{
- WebKitUserScript *script;
+ g_autoptr (WebKitUserScript) script = NULL;
g_autoptr (GBytes) youtube_js = NULL;
g_auto (GStrv) allow_list = NULL;
g_autoptr (GError) error = NULL;
@@ -4317,7 +4317,7 @@ GtkWidget *
ephy_web_view_new (void)
{
EphyEmbedShell *shell = ephy_embed_shell_get_default ();
- WebKitUserContentManager *ucm = webkit_user_content_manager_new ();
+ g_autoptr (WebKitUserContentManager) ucm = webkit_user_content_manager_new ();
ephy_embed_shell_register_ucm_handler (shell, ucm);
ephy_embed_prefs_register_ucm (ucm);
@@ -4336,7 +4336,7 @@ GtkWidget *
ephy_web_view_new_with_related_view (WebKitWebView *related_view)
{
EphyEmbedShell *shell = ephy_embed_shell_get_default ();
- WebKitUserContentManager *ucm = webkit_user_content_manager_new ();
+ g_autoptr (WebKitUserContentManager) ucm = webkit_user_content_manager_new ();
ephy_web_view_ucm_add_custom_scripts (ucm);
diff --git a/src/webextension/ephy-web-extension-manager.c b/src/webextension/ephy-web-extension-manager.c
index 4cf80a6b6..3ff9ca32d 100644
--- a/src/webextension/ephy-web-extension-manager.c
+++ b/src/webextension/ephy-web-extension-manager.c
@@ -620,7 +620,7 @@ static GtkWidget *
create_web_extensions_webview (EphyWebExtension *web_extension,
gboolean custom_web_context)
{
- WebKitUserContentManager *ucm;
+ g_autoptr (WebKitUserContentManager) ucm = NULL;
WebKitWebContext *web_context;
WebKitSettings *settings;
GtkWidget *web_view;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]