]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix potential memory leak.
authorMichael R Sweet <msweet@msweet.org>
Tue, 15 Apr 2025 14:52:10 +0000 (10:52 -0400)
committerMichael R Sweet <msweet@msweet.org>
Tue, 15 Apr 2025 14:52:10 +0000 (10:52 -0400)
scheduler/job.c
scheduler/job.h

index 207c506f3e338db8eda831eaf5c9b4d63cdc53cf..8a1b08117cfff69a695a9ee98c7ad42a4efeb247 100644 (file)
@@ -4722,7 +4722,13 @@ load_request_root(void)
          unload_job(job);
       }
       else
-        free(job);
+      {
+       /*
+        * Unable to load job, delete it...
+        */
+
+        cupsdDeleteJob(job, CUPSD_JOB_FORCE);
+      }
     }
 
   cupsDirClose(dir);
index 619353d1bb50e7408ea0d055dfe9ed6913b9586d..8562cac41623ac9e78ad188e5db3110532f03e38 100644 (file)
@@ -2,10 +2,11 @@
  * Print job definitions for the CUPS scheduler.
  *
  * Copyright © 2020-2024 by OpenPrinting.
- * Copyright 2007-2015 by Apple Inc.
- * Copyright 1997-2007 by Easy Software Products, all rights reserved.
+ * Copyright © 2007-2015 by Apple Inc.
+ * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
  *
- * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more
+ * information.
  */
 
 /*