From: Michael R Sweet Date: Tue, 15 Apr 2025 14:52:10 +0000 (-0400) Subject: Fix potential memory leak. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6377b0a77e85af19ccc5a5eb76d056ef42b3cfed;p=thirdparty%2Fcups.git Fix potential memory leak. --- diff --git a/scheduler/job.c b/scheduler/job.c index 207c506f3e..8a1b08117c 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -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); diff --git a/scheduler/job.h b/scheduler/job.h index 619353d1bb..8562cac416 100644 --- a/scheduler/job.h +++ b/scheduler/job.h @@ -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. */ /*