2020-11-24 10:56:24 +00:00
|
|
|
|
diff --git a/cups/http-support.c b/cups/http-support.c
|
2020-11-25 11:04:02 +00:00
|
|
|
|
index 6317514..ea8640c 100644
|
2020-11-24 10:56:24 +00:00
|
|
|
|
--- a/cups/http-support.c
|
|
|
|
|
+++ b/cups/http-support.c
|
|
|
|
|
@@ -1,8 +1,9 @@
|
|
|
|
|
/*
|
|
|
|
|
* HTTP support routines for CUPS.
|
|
|
|
|
*
|
|
|
|
|
- * Copyright 2007-2019 by Apple Inc.
|
|
|
|
|
- * Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
|
|
|
|
+ * Copyright © 2020 by Michael R Sweet
|
|
|
|
|
+ * Copyright © 2007-2019 by Apple Inc.
|
|
|
|
|
+ * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Licensed under Apache License v2.0. See the file "LICENSE" for more
|
|
|
|
|
* information.
|
2020-11-25 11:04:02 +00:00
|
|
|
|
@@ -26,6 +27,8 @@
|
|
|
|
|
#elif defined(HAVE_AVAHI)
|
|
|
|
|
# include <avahi-client/client.h>
|
|
|
|
|
# include <avahi-client/lookup.h>
|
|
|
|
|
+// for avahi_free()
|
|
|
|
|
+# include <avahi-common/malloc.h>
|
|
|
|
|
# include <avahi-common/simple-watch.h>
|
|
|
|
|
#endif /* HAVE_DNSSD */
|
|
|
|
|
|
|
|
|
|
@@ -2536,6 +2539,8 @@ http_resolve_cb(
|
2020-11-24 10:56:24 +00:00
|
|
|
|
memcpy(uuid, value, valueLen);
|
|
|
|
|
uuid[valueLen] = '\0';
|
|
|
|
|
|
|
|
|
|
+ avahi_free(value);
|
|
|
|
|
+
|
|
|
|
|
if (_cups_strcasecmp(uuid, uribuf->uuid))
|
|
|
|
|
{
|
|
|
|
|
if (uribuf->options & _HTTP_RESOLVE_STDERR)
|
2020-11-25 11:04:02 +00:00
|
|
|
|
@@ -2620,6 +2625,8 @@ http_resolve_cb(
|
2020-11-24 10:56:24 +00:00
|
|
|
|
memcpy(resource + 1, value, valueLen);
|
|
|
|
|
resource[valueLen + 1] = '\0';
|
|
|
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ avahi_free(value);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|