[epiphany/gnome-41] web-view: Fix a leak in open_response_cb()



commit 6283ead6e72b060837a2028553541b47c02e635d
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.
    
    
    (cherry picked from commit 4861ee3c7c8baaa4d8d51c2ff1e0433ce9cb93d0)

 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 a16cf5b82..14e7c3c69 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -169,7 +169,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]