memory leak in modules/printbackends/cups/gtkprintbackendcups.c
Submitted by Andrei Voropaev
Assigned to Marek Kašík @mkasik
Link to original bug (#782790)
Description
Valgrind reports that function cups_request_printer_list_cb from modules/printbackends/cups/gtkprintbackendcups.c leaks memory. Specifically line
GTK_PRINTER_CUPS (printer)->covers = g_strdupv (info->covers);
What happens here is that "printer" is cached and every time when function is called it operates on cached value. As result it throws away previously allocated "covers" array and allocates new.
I'm not so sure what would be the proper fix here, possibly, the value should not be overriden, if it is already set. Or the value shall be released before it is set.