From 1b62203f186e28f6c46a01a5063bca575aad65ab Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 9 Jul 2020 00:31:06 -0400 Subject: [PATCH] cups: Plug a memory leak This showed up under asan. --- modules/printbackends/gtkprintbackendcups.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/printbackends/gtkprintbackendcups.c b/modules/printbackends/gtkprintbackendcups.c index a5f3bea37c..d91a9ec577 100644 --- a/modules/printbackends/gtkprintbackendcups.c +++ b/modules/printbackends/gtkprintbackendcups.c @@ -3629,6 +3629,7 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend, GTK_PRINTER_CUPS (printer)->supports_collate = info->supports_collate; GTK_PRINTER_CUPS (printer)->supports_number_up = info->supports_number_up; GTK_PRINTER_CUPS (printer)->number_of_covers = info->number_of_covers; + g_clear_pointer (&(GTK_PRINTER_CUPS (printer)->covers), g_strfreev); GTK_PRINTER_CUPS (printer)->covers = g_strdupv (info->covers); status_changed = gtk_printer_set_job_count (printer, info->job_count); status_changed |= gtk_printer_set_location (printer, info->location);