diff --git a/scheduler/job.c b/scheduler/job.c index ba98bf1f05..36474ea74a 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -1405,11 +1405,11 @@ cupsdDeleteJob(cupsd_job_t *job, /* I - Job */ job->num_files = 0; } + unload_job(job); + if (job->history) free_job_history(job); - unload_job(job); - cupsArrayRemove(Jobs, job); cupsArrayRemove(ActiveJobs, job); cupsArrayRemove(PrintingJobs, job);