[gnome-control-center] printers: Fix PpPrinter reference leaks
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Fix PpPrinter reference leaks
- Date: Tue, 22 Sep 2020 21:30:36 +0000 (UTC)
commit e6a05e535e8577b7c51ba96c7f126ebbce22c4cc
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Jun 26 16:51:06 2020 +1200
printers: Fix PpPrinter reference leaks
They were not unreferenced in the callback.
panels/printers/pp-jobs-dialog.c | 2 +-
panels/printers/pp-printer-entry.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/printers/pp-jobs-dialog.c b/panels/printers/pp-jobs-dialog.c
index 2235ffc8d..08e2dc8ce 100644
--- a/panels/printers/pp-jobs-dialog.c
+++ b/panels/printers/pp-jobs-dialog.c
@@ -389,7 +389,7 @@ update_jobs_list_cb (GObject *source_object,
static void
update_jobs_list (PpJobsDialog *self)
{
- PpPrinter *printer;
+ g_autoptr(PpPrinter) printer = NULL;
if (self->printer_name != NULL)
{
diff --git a/panels/printers/pp-printer-entry.c b/panels/printers/pp-printer-entry.c
index a943f65e5..8a9f353b5 100644
--- a/panels/printers/pp-printer-entry.c
+++ b/panels/printers/pp-printer-entry.c
@@ -440,7 +440,7 @@ on_show_printer_details_dialog (GtkButton *button,
new_name = pp_details_dialog_get_printer_name (dialog);
if (g_strcmp0 (self->printer_name, new_name) != 0)
{
- PpPrinter *printer = pp_printer_new (self->printer_name);
+ g_autoptr(PpPrinter) printer = pp_printer_new (self->printer_name);
pp_printer_rename_async (printer,
new_name,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]