cups: release secrets task resources

This commit is contained in:
Daemonratte 2026-05-15 16:35:47 +02:00
commit 2e454a61ba

View file

@ -78,7 +78,7 @@ create_attributes (const gchar *printer_uri,
/* The printer uri is the main identifying part */
g_variant_builder_add (attr_builder, "{ss}", "uri", printer_uri);
if (additional_labels != NULL)
if (additional_labels != NULL && additional_attrs != NULL)
{
int i;
for (i = 0; additional_labels[i] != NULL; i++)
@ -170,6 +170,9 @@ get_secret_cb (GObject *source_object,
}
}
g_variant_iter_free (iter);
g_variant_unref (attributes);
if (pw_field == -1)
{
/* should not happen... */
@ -938,6 +941,7 @@ cleanup_task_data (gpointer data)
g_clear_object (&task_data->dbus_connection);
g_clear_pointer (&task_data->session_path, g_free);
g_clear_object (&task_data->item_proxy);
g_free (task_data);
}
/**