[epiphany/pgriffis/web-extension-beastify: 1/7] WebExtensions: Fix double-free




commit ffad0f604318a2065b6a8879f1ab5847e3e94c98
Author: Patrick Griffis <pgriffis igalia com>
Date:   Fri May 20 12:20:54 2022 -0500

    WebExtensions: Fix double-free
    
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1114>

 src/webextension/api/tabs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/webextension/api/tabs.c b/src/webextension/api/tabs.c
index 6587b7e63..4f24fc357 100644
--- a/src/webextension/api/tabs.c
+++ b/src/webextension/api/tabs.c
@@ -159,7 +159,7 @@ tabs_handler_execute_script (EphyWebExtension *self,
   if (jsc_value_is_array (args)) {
     obj = jsc_value_object_get_property_at_index (args, 1);
   } else {
-    obj = args;
+    obj = g_object_ref (args);
   }
 
   file_value = jsc_value_object_get_property (obj, "file");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]