[epiphany/wip/exalm/gtk4-cleanups-3: 11/23] web-view: Fix a leak in open_response_cb()




commit 379c1d813f3634c91ed4a1e3780658a04f5b9594
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Dec 1 14:28:38 2021 +0500

    web-view: Fix a leak in open_response_cb()
    
    webkit_file_chooser_request_select_files() is transfer none, we still need
    to free the array.
    
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1038>

 embed/ephy-web-view.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 81af0ed81..12cd2455d 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -170,7 +170,7 @@ open_response_cb (GtkFileChooser           *dialog,
     g_ptr_array_add (file_array, NULL);
     webkit_file_chooser_request_select_files (request, (const char * const *)file_array->pdata);
     g_slist_free_full (file_list, g_free);
-    g_ptr_array_free (file_array, FALSE);
+    g_ptr_array_free (file_array, TRUE);
     g_settings_set_string (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_LAST_UPLOAD_DIRECTORY, 
gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (dialog)));
   } else {
     webkit_file_chooser_request_cancel (request);


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