|
|
5795b1 |
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
|
|
5795b1 |
index 2cc64dd..e3f5cca 100644
|
|
|
5795b1 |
--- a/utils/cups-browsed.c
|
|
|
5795b1 |
+++ b/utils/cups-browsed.c
|
|
|
5795b1 |
@@ -2471,7 +2471,8 @@ on_printer_state_changed (CupsNotifier *object,
|
|
|
5795b1 |
char *ptr, buf[1024];
|
|
|
5795b1 |
remote_printer_t *p, *q;
|
|
|
5795b1 |
http_t *http = NULL;
|
|
|
5795b1 |
- ipp_t *request, *response;
|
|
|
5795b1 |
+ ipp_t *request = NULL;
|
|
|
5795b1 |
+ ipp_t *response = NULL;
|
|
|
5795b1 |
ipp_attribute_t *attr;
|
|
|
5795b1 |
const char *pname = NULL;
|
|
|
5795b1 |
ipp_pstate_t pstate = IPP_PRINTER_IDLE;
|
|
|
5795b1 |
@@ -2733,6 +2734,10 @@ on_printer_state_changed (CupsNotifier *object,
|
|
|
5795b1 |
break;
|
|
|
5795b1 |
}
|
|
|
5795b1 |
}
|
|
|
5795b1 |
+ if (response) {
|
|
|
5795b1 |
+ ippDelete(response);
|
|
|
5795b1 |
+ response = NULL;
|
|
|
5795b1 |
+ }
|
|
|
5795b1 |
if (pstate == IPP_PRINTER_IDLE && paccept) {
|
|
|
5795b1 |
q->last_printer = i;
|
|
|
5795b1 |
break;
|
|
|
5795b1 |
@@ -3640,8 +3645,8 @@ gboolean handle_cups_queues(gpointer unused) {
|
|
|
5795b1 |
/* Default option settings from printer entry */
|
|
|
5795b1 |
for (i = 0; i < p->num_options; i ++)
|
|
|
5795b1 |
if (strcasecmp(p->options[i].name, "printer-is-shared"))
|
|
|
5795b1 |
- num_options = cupsAddOption(strdup(p->options[i].name),
|
|
|
5795b1 |
- strdup(p->options[i].value),
|
|
|
5795b1 |
+ num_options = cupsAddOption(p->options[i].name,
|
|
|
5795b1 |
+ p->options[i].value,
|
|
|
5795b1 |
num_options, &options);
|
|
|
5795b1 |
/* Encode option list into IPP attributes */
|
|
|
5795b1 |
cupsEncodeOptions2(request, num_options, options, IPP_TAG_PRINTER);
|