[gnome-control-center] printers: Fix GCancellable leak



commit 2c6eb2b4fd48f2a8a67ebff895040b45c8a8e763
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Nov 23 14:14:08 2018 +1300

    printers: Fix GCancellable leak
    
    Use the dialog cancellable instead of leaking one each time the PPD is set.

 panels/printers/pp-details-dialog.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/panels/printers/pp-details-dialog.c b/panels/printers/pp-details-dialog.c
index cf74d92b5..fe68f9ad7 100644
--- a/panels/printers/pp-details-dialog.c
+++ b/panels/printers/pp-details-dialog.c
@@ -225,13 +225,9 @@ ppd_selection_dialog_response_cb (GtkDialog *dialog,
 
       if (self->printer_name && ppd_name)
         {
-          GCancellable *cancellable;
-
-          cancellable = g_cancellable_new ();
-
           printer_set_ppd_async (self->printer_name,
                                  ppd_name,
-                                 cancellable,
+                                 self->cancellable,
                                  set_ppd_cb,
                                  self);
 


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