cups-filters/cups-filters-free-after-error.patch
DistroBaker efcac2932d Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/cups-filters.git#12bd6655362f7e0f8790c34a208d10ca6333f99e
2020-11-24 06:11:48 +00:00

27 lines
800 B
Diff

diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
index a303df3..58f8be5 100644
--- a/utils/cups-browsed.c
+++ b/utils/cups-browsed.c
@@ -8949,6 +8949,21 @@ gboolean update_cups_queues(gpointer unused) {
p->timeout = current_time + pause_between_cups_queue_updates;
cannot_create:
+ if (printer_attributes != NULL && num_cluster_printers != 1)
+ ippDelete(printer_attributes);
+
+ if (default_pagesize != NULL && num_cluster_printers != 1)
+ free(default_pagesize);
+
+ if (conflicts != NULL && num_cluster_printers != 1)
+ cupsArrayDelete(conflicts);
+
+ if (make_model != NULL && num_cluster_printers != 1)
+ free(make_model);
+
+ if (sizes != NULL && num_cluster_printers != 1)
+ cupsArrayDelete(sizes);
+
if (p && !in_shutdown)
remove_printer_entry(p);