[gnome-control-center] printers: Don't pass ownership in get_ipp_attributes_async callback
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Don't pass ownership in get_ipp_attributes_async callback
- Date: Sun, 14 Feb 2021 21:39:10 +0000 (UTC)
commit 98fd38278a79121692f885090a36ab882cdfb086
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Feb 12 15:04:52 2021 +1300
printers: Don't pass ownership in get_ipp_attributes_async callback
panels/printers/pp-ipp-option-widget.c | 2 +-
panels/printers/pp-options-dialog.c | 2 +-
panels/printers/pp-utils.c | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/panels/printers/pp-ipp-option-widget.c b/panels/printers/pp-ipp-option-widget.c
index 00d56df39..ec2c92a82 100644
--- a/panels/printers/pp-ipp-option-widget.c
+++ b/panels/printers/pp-ipp-option-widget.c
@@ -539,7 +539,7 @@ get_ipp_attributes_cb (GHashTable *table,
if (self->ipp_attribute)
g_hash_table_unref (self->ipp_attribute);
- self->ipp_attribute = table;
+ self->ipp_attribute = g_hash_table_ref (table);
update_widget_real (self);
}
diff --git a/panels/printers/pp-options-dialog.c b/panels/printers/pp-options-dialog.c
index d1164bd13..59229cd48 100644
--- a/panels/printers/pp-options-dialog.c
+++ b/panels/printers/pp-options-dialog.c
@@ -727,7 +727,7 @@ get_ipp_attributes_cb (GHashTable *table,
if (self->ipp_attributes)
g_hash_table_unref (self->ipp_attributes);
- self->ipp_attributes = table;
+ self->ipp_attributes = g_hash_table_ref (table);
self->ipp_attributes_set = TRUE;
if (self->ppd_filename_set &&
diff --git a/panels/printers/pp-utils.c b/panels/printers/pp-utils.c
index 39e31d847..a911503b2 100644
--- a/panels/printers/pp-utils.c
+++ b/panels/printers/pp-utils.c
@@ -1200,6 +1200,8 @@ gia_data_free (GIAData *data)
g_free (data->printer_name);
if (data->attributes_names)
g_strfreev (data->attributes_names);
+ if (data->result)
+ g_hash_table_unref (data->result);
if (data->context)
g_main_context_unref (data->context);
g_free (data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]