From 2bdc90b9b4b721a3147439b384dd603f84ab1081 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 7 Sep 2020 12:15:57 +0200 Subject: [PATCH] Free the used memory --- utils/driverless.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/driverless.c b/utils/driverless.c index 4aed5b36a..9e1958c50 100644 --- a/utils/driverless.c +++ b/utils/driverless.c @@ -490,9 +490,11 @@ listPrintersInArray(int reg_type_no, int mode, int isFax, char* ippfind_output ) } read_error: + free(service_uri); return; } + free(service_uri); return; } @@ -513,9 +515,9 @@ list_printers (int mode, int reg_type_no, int isFax) *service_uri_list_ipp; /* Array to store ippfind output for IPP */ service_uri_list_ipps = - cupsArrayNew((cups_array_func_t)compare_service_uri, NULL); + cupsArrayNew3((cups_array_func_t)compare_service_uri, NULL, NULL, 0, NULL, (cups_afree_func_t)free); service_uri_list_ipp = - cupsArrayNew((cups_array_func_t)compare_service_uri, NULL); + cupsArrayNew3((cups_array_func_t)compare_service_uri, NULL, NULL, 0, NULL, (cups_afree_func_t)free); /* -- 2.47.2