From 96746de2cc728316e33558c52865120e9ab57626 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 9 Oct 2019 18:47:51 +0200 Subject: [PATCH] Fix leaks in get-printer-attributes --- utils/cups-browsed.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c index 780a3535e..da5f621a2 100644 --- a/utils/cups-browsed.c +++ b/utils/cups-browsed.c @@ -5805,6 +5805,7 @@ get_printer_attributes(const char* uri, int fallback_request, !strcmp(valuebuffer,"server-error-version-not-supported")){ if (!fallback_request) { debug_printf("The server doesn't support IPP2.0 request, trying to IPP1.1 request\n"); + httpClose(http_printer); return get_printer_attributes(uri,1,pattrs,job_state_attributes, attr_size); } } @@ -5816,9 +5817,11 @@ get_printer_attributes(const char* uri, int fallback_request, uri, cupsLastErrorString()); if (!fallback_request) { debug_printf("Trying IPP1.1 Request\n"); + httpClose(http_printer); return get_printer_attributes(uri,1,pattrs,job_state_attributes, attr_size); } } + httpClose(http_printer); return response; } -- 2.47.2