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




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

    WebExtensions: Fix double-free

 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]