e9cb4a
diff --git a/backend/ipp.c b/backend/ipp.c
e9cb4a
index 32eb3aaa4..2a880bd75 100644
e9cb4a
--- a/backend/ipp.c
e9cb4a
+++ b/backend/ipp.c
e9cb4a
@@ -3612,6 +3612,8 @@ update_reasons(ipp_attribute_t *attr,	/* I - printer-state-reasons or NULL */
e9cb4a
     }
e9cb4a
   }
e9cb4a
 
e9cb4a
+  cupsArrayDelete(new_reasons);
e9cb4a
+
e9cb4a
   _cupsMutexUnlock(&report_mutex);
e9cb4a
 
e9cb4a
  /*
e9cb4a
diff --git a/cgi-bin/search.c b/cgi-bin/search.c
e9cb4a
index 3956afc33..ad1f5ed0e 100644
e9cb4a
--- a/cgi-bin/search.c
e9cb4a
+++ b/cgi-bin/search.c
e9cb4a
@@ -361,4 +362,5 @@ void
e9cb4a
 cgiFreeSearch(void *search)		/* I - Search context */
e9cb4a
 {
e9cb4a
   regfree((regex_t *)search);
e9cb4a
+  free(search);
e9cb4a
 }
e9cb4a
diff --git a/cups/http-addrlist.c b/cups/http-addrlist.c
e9cb4a
index 5d510140b..688901a7d 100644
e9cb4a
--- a/cups/http-addrlist.c
e9cb4a
+++ b/cups/http-addrlist.c
e9cb4a
@@ -612,6 +613,7 @@ httpAddrGetList(const char *hostname,	/* I - Hostname, IP address, or NULL for p
e9cb4a
 	  if (!temp)
e9cb4a
 	  {
e9cb4a
 	    httpAddrFreeList(first);
e9cb4a
+	    freeaddrinfo(results);
e9cb4a
 	    _cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(errno), 0);
e9cb4a
 	    return (NULL);
e9cb4a
 	  }
e9cb4a
diff --git a/cups/http.c b/cups/http.c
e9cb4a
index a9235b087..d9332cc83 100644
e9cb4a
--- a/cups/http.c
e9cb4a
+++ b/cups/http.c
e9cb4a
@@ -3915,7 +3915,7 @@ http_create(
e9cb4a
   if ((http = calloc(sizeof(http_t), 1)) == NULL)
e9cb4a
   {
e9cb4a
     _cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(errno), 0);
e9cb4a
-    httpAddrFreeList(addrlist);
e9cb4a
+    httpAddrFreeList(myaddrlist);
e9cb4a
     return (NULL);
e9cb4a
   }
e9cb4a
 
e9cb4a
diff --git a/ppdc/ppdc-source.cxx b/ppdc/ppdc-source.cxx
e9cb4a
index be24cebae..4e8cba7bb 100644
e9cb4a
--- a/ppdc/ppdc-source.cxx
e9cb4a
+++ b/ppdc/ppdc-source.cxx
e9cb4a
@@ -2665,6 +2666,7 @@ ppdcSource::scan_file(ppdcFile   *fp,	// I - File to read
e9cb4a
       // Add it to the current option...
e9cb4a
       if (!o)
e9cb4a
       {
e9cb4a
+        c->release();
e9cb4a
         _cupsLangPrintf(stderr,
e9cb4a
 	                _("ppdc: Choice found on line %d of %s with no "
e9cb4a
 			  "Option."), fp->line, fp->filename);
e9cb4a
diff --git a/scheduler/cups-driverd.cxx b/scheduler/cups-driverd.cxx
e9cb4a
index 657eee0a0..b518a9325 100644
e9cb4a
--- a/scheduler/cups-driverd.cxx
e9cb4a
+++ b/scheduler/cups-driverd.cxx
e9cb4a
@@ -153,7 +153,7 @@ static ppd_info_t	*add_ppd(const char *filename, const char *name,
e9cb4a
 				 size_t size, int model_number, int type,
e9cb4a
 				 const char *scheme);
e9cb4a
 static int		cat_drv(const char *name, int request_id);
e9cb4a
-static int		cat_ppd(const char *name, int request_id);
e9cb4a
+static void		cat_ppd(const char *name, int request_id);
e9cb4a
 static int		cat_static(const char *name, int request_id);
e9cb4a
 static int		cat_tar(const char *name, int request_id);
e9cb4a
 static int		compare_inodes(struct stat *a, struct stat *b);
e9cb4a
@@ -163,12 +163,12 @@ static int		compare_names(const ppd_info_t *p0,
e9cb4a
 			              const ppd_info_t *p1);
e9cb4a
 static int		compare_ppds(const ppd_info_t *p0,
e9cb4a
 			             const ppd_info_t *p1);
e9cb4a
-static int		dump_ppds_dat(const char *filename);
e9cb4a
+static void		dump_ppds_dat(const char *filename);
e9cb4a
 static void		free_array(cups_array_t *a);
e9cb4a
 static cups_file_t	*get_file(const char *name, int request_id,
e9cb4a
 			          const char *subdir, char *buffer,
e9cb4a
 			          size_t bufsize, char **subfile);
e9cb4a
-static int		list_ppds(int request_id, int limit, const char *opt);
e9cb4a
+static void		list_ppds(int request_id, int limit, const char *opt);
e9cb4a
 static int		load_drivers(cups_array_t *include,
e9cb4a
 			             cups_array_t *exclude);
e9cb4a
 static int		load_drv(const char *filename, const char *name,
e9cb4a
@@ -204,13 +204,13 @@ main(int  argc,				/* I - Number of command-line args */
e9cb4a
   */
e9cb4a
 
e9cb4a
   if (argc == 3 && !strcmp(argv[1], "cat"))
e9cb4a
-    return (cat_ppd(argv[2], 0));
e9cb4a
+    cat_ppd(argv[2], 0);
e9cb4a
   else if ((argc == 2 || argc == 3) && !strcmp(argv[1], "dump"))
e9cb4a
-    return (dump_ppds_dat(argv[2]));
e9cb4a
+    dump_ppds_dat(argv[2]);
e9cb4a
   else if (argc == 4 && !strcmp(argv[1], "get"))
e9cb4a
-    return (cat_ppd(argv[3], atoi(argv[2])));
e9cb4a
+    cat_ppd(argv[3], atoi(argv[2]));
e9cb4a
   else if (argc == 5 && !strcmp(argv[1], "list"))
e9cb4a
-    return (list_ppds(atoi(argv[2]), atoi(argv[3]), argv[4]));
e9cb4a
+    list_ppds(atoi(argv[2]), atoi(argv[3]), argv[4]);
e9cb4a
   else
e9cb4a
   {
e9cb4a
     fputs("Usage: cups-driverd cat ppd-name\n", stderr);
e9cb4a
@@ -428,7 +428,7 @@ cat_drv(const char *name,		/* I - PPD name */
e9cb4a
  * 'cat_ppd()' - Copy a PPD file to stdout.
e9cb4a
  */
e9cb4a
 
e9cb4a
-static int				/* O - Exit code */
e9cb4a
+static void
e9cb4a
 cat_ppd(const char *name,		/* I - PPD name */
e9cb4a
         int        request_id)		/* I - Request ID for response? */
e9cb4a
 {
e9cb4a
@@ -445,7 +445,7 @@ cat_ppd(const char *name,		/* I - PPD name */
e9cb4a
   if (strstr(name, "../"))
e9cb4a
   {
e9cb4a
     fputs("ERROR: Invalid PPD name.\n", stderr);
e9cb4a
-    return (1);
e9cb4a
+    exit(1);
e9cb4a
   }
e9cb4a
 
e9cb4a
   strlcpy(scheme, name, sizeof(scheme));
e9cb4a
@@ -475,11 +475,11 @@ cat_ppd(const char *name,		/* I - PPD name */
e9cb4a
     puts("Content-Type: application/ipp\n");
e9cb4a
 
e9cb4a
   if (!scheme[0])
e9cb4a
-    return (cat_static(name, request_id));
e9cb4a
+    exit(cat_static(name, request_id));
e9cb4a
   else if (!strcmp(scheme, "drv"))
e9cb4a
-    return (cat_drv(name, request_id));
e9cb4a
+    exit(cat_drv(name, request_id));
e9cb4a
   else if (!strcmp(scheme, "file"))
e9cb4a
-    return (cat_tar(name, request_id));
e9cb4a
+    exit(cat_tar(name, request_id));
e9cb4a
   else
e9cb4a
   {
e9cb4a
    /*
e9cb4a
@@ -517,7 +517,7 @@ cat_ppd(const char *name,		/* I - PPD name */
e9cb4a
         cupsdSendIPPTrailer();
e9cb4a
       }
e9cb4a
 
e9cb4a
-      return (1);
e9cb4a
+      exit(1);
e9cb4a
     }
e9cb4a
 
e9cb4a
    /*
e9cb4a
@@ -547,15 +547,15 @@ cat_ppd(const char *name,		/* I - PPD name */
e9cb4a
 
e9cb4a
       fprintf(stderr, "ERROR: [cups-driverd] Unable to execute \"%s\" - %s\n",
e9cb4a
               line, strerror(errno));
e9cb4a
-      return (1);
e9cb4a
+      exit(1);
e9cb4a
     }
e9cb4a
   }
e9cb4a
 
e9cb4a
  /*
e9cb4a
-  * Return with no errors...
e9cb4a
+  * Exit with no errors...
e9cb4a
   */
e9cb4a
 
e9cb4a
-  return (0);
e9cb4a
+  exit(0);
e9cb4a
 }
e9cb4a
 
e9cb4a
 
e9cb4a
@@ -778,7 +778,7 @@ compare_ppds(const ppd_info_t *p0,	/* I - First PPD file */
e9cb4a
  * 'dump_ppds_dat()' - Dump the contents of the ppds.dat file.
e9cb4a
  */
e9cb4a
 
e9cb4a
-static int				/* O - Exit status */
e9cb4a
+static void
e9cb4a
 dump_ppds_dat(const char *filename)	/* I - Filename */
e9cb4a
 {
e9cb4a
   char		temp[1024];		/* ppds.dat filename */
e9cb4a
@@ -810,7 +810,7 @@ dump_ppds_dat(const char *filename)	/* I - Filename */
e9cb4a
 	   ppd->record.make_and_model, ppd->record.device_id,
e9cb4a
 	   ppd->record.scheme);
e9cb4a
 
e9cb4a
-  return (0);
e9cb4a
+  exit(0);
e9cb4a
 }
e9cb4a
 
e9cb4a
 
e9cb4a
@@ -1004,7 +1004,7 @@ get_file(const char *name,		/* I - Name */
e9cb4a
  * 'list_ppds()' - List PPD files.
e9cb4a
  */
e9cb4a
 
e9cb4a
-static int				/* O - Exit code */
e9cb4a
+static void
e9cb4a
 list_ppds(int        request_id,	/* I - Request ID */
e9cb4a
           int        limit,		/* I - Limit */
e9cb4a
 	  const char *opt)		/* I - Option argument */
e9cb4a
@@ -1566,7 +1566,7 @@ list_ppds(int        request_id,	/* I - Request ID */
e9cb4a
   if (request_id)
e9cb4a
     cupsdSendIPPTrailer();
e9cb4a
 
e9cb4a
-  return (0);
e9cb4a
+  exit(0);
e9cb4a
 }
e9cb4a
 
e9cb4a
 
e9cb4a
-- 
e9cb4a
2.17.1
e9cb4a