cups-filters/cups-filters-uuid.patch

23 lines
774 B
Diff
Raw Normal View History

diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
index 8c2040b6..b0e7a803 100644
--- a/utils/cups-browsed.c
+++ b/utils/cups-browsed.c
@@ -3614,7 +3614,7 @@ new_local_printer (const char *device_uri,
{
local_printer_t *printer = g_malloc (sizeof (local_printer_t));
printer->device_uri = strdup (device_uri);
- printer->uuid = (uuid ? strdup (uuid) : NULL);
+ printer->uuid = uuid;
printer->cups_browsed_controlled = cups_browsed_controlled;
return printer;
}
@@ -3796,7 +3796,7 @@ get_printer_uuid(http_t *http_printer,
if (attr)
- uuid = ippGetString(attr, 0, NULL) + 9;
+ uuid = strdup(ippGetString(attr, 0, NULL) + 9);
else {
debug_printf ("Printer with URI %s: Cannot read \"printer-uuid\" IPP attribute!\n",
raw_uri);