]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix memory leak of environment strings on failed execution.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 4 Feb 2015 13:12:50 +0000 (13:12 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 4 Feb 2015 13:12:50 +0000 (13:12 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12485 a1ca3aef-8c08-0410-bb20-df032aa958be

test/ippserver.c

index fbe57add29166d4451952b93141d292c084753fb..7b39bc340abafaabfd374f6e36ded97c034edc96 100644 (file)
@@ -5469,6 +5469,13 @@ process_job(_ipp_job_t *job)             /* I - Job */
 
       perror("Unable to start job processing command");
       status = -1;
+
+     /*
+      * Free memory used for environment...
+      */
+
+      while (myenvc > 0)
+       free(myenvp[-- myenvc]);
     }
     else
     {
@@ -5478,7 +5485,6 @@ process_job(_ipp_job_t *job)              /* I - Job */
 
       while (myenvc > 0)
        free(myenvp[-- myenvc]);
-
      /*
       * Wait for child to complete...
       */