]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
Free the used memory 306/head
authorZdenek Dohnal <zdohnal@redhat.com>
Mon, 7 Sep 2020 10:15:57 +0000 (12:15 +0200)
committerZdenek Dohnal <zdohnal@redhat.com>
Mon, 7 Sep 2020 10:15:57 +0000 (12:15 +0200)
utils/driverless.c

index 4aed5b36a412441868b108bc608f206359fa5270..9e1958c50696bed8bf59bb8bb33c1de6c75ed2f6 100644 (file)
@@ -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);
   
 
  /*