cf3d6e2
diff -up cups-1.4.2/CHANGES-1.4.txt.str3407 cups-1.4.2/CHANGES-1.4.txt
cf3d6e2
diff -up cups-1.4.2/scheduler/job.c.str3407 cups-1.4.2/scheduler/job.c
cf3d6e2
--- cups-1.4.2/scheduler/job.c.str3407	2009-11-17 12:18:38.518084476 +0000
cf3d6e2
+++ cups-1.4.2/scheduler/job.c	2009-11-17 13:00:46.204083691 +0000
cf3d6e2
@@ -1721,7 +1721,30 @@ cupsdLoadJob(cupsd_job_t *job)		/* I - J
cf3d6e2
           cupsdLogMessage(CUPSD_LOG_ERROR,
cf3d6e2
 	                  "[Job %d] Ran out of memory for job file types!",
cf3d6e2
 			  job->id);
cf3d6e2
-	  return (1);
cf3d6e2
+
cf3d6e2
+	  ippDelete(job->attrs);
cf3d6e2
+	  job->attrs = NULL;
cf3d6e2
+
cf3d6e2
+	  if (compressions)
cf3d6e2
+	    free(compressions);
cf3d6e2
+
cf3d6e2
+	  if (filetypes)
cf3d6e2
+	    free(filetypes);
cf3d6e2
+
cf3d6e2
+	  if (job->compressions)
cf3d6e2
+	  {
cf3d6e2
+	    free(job->compressions);
cf3d6e2
+	    job->compressions = NULL;
cf3d6e2
+	  }
cf3d6e2
+
cf3d6e2
+	  if (job->filetypes)
cf3d6e2
+	  {
cf3d6e2
+	    free(job->filetypes);
cf3d6e2
+	    job->filetypes = NULL;
cf3d6e2
+	  }
cf3d6e2
+
cf3d6e2
+	  job->num_files = 0;
cf3d6e2
+	  return (0);
cf3d6e2
 	}
cf3d6e2
 
cf3d6e2
         job->compressions = compressions;
cf3d6e2
@@ -1789,6 +1812,21 @@ cupsdLoadJob(cupsd_job_t *job)		/* I - J
cf3d6e2
 
cf3d6e2
   ippDelete(job->attrs);
cf3d6e2
   job->attrs = NULL;
cf3d6e2
+
cf3d6e2
+  if (job->compressions)
cf3d6e2
+  {
cf3d6e2
+    free(job->compressions);
cf3d6e2
+    job->compressions = NULL;
cf3d6e2
+  }
cf3d6e2
+
cf3d6e2
+  if (job->filetypes)
cf3d6e2
+  {
cf3d6e2
+    free(job->filetypes);
cf3d6e2
+    job->filetypes = NULL;
cf3d6e2
+  }
cf3d6e2
+
cf3d6e2
+  job->num_files = 0;
cf3d6e2
+
cf3d6e2
   unlink(jobfile);
cf3d6e2
 
cf3d6e2
   return (0);
cf3d6e2
@@ -4411,7 +4449,7 @@ update_job_attrs(cupsd_job_t *job,	/* I 
cf3d6e2
   else if (job->printer->state_message[0] && do_message)
cf3d6e2
     cupsdSetString(&(job->printer_message->values[0].string.text),
cf3d6e2
 		   job->printer->state_message);
cf3d6e2
-  
cf3d6e2
+
cf3d6e2
  /*
cf3d6e2
   * ... and the printer-state-reasons value...
cf3d6e2
   */