]> git.ipfire.org Git - thirdparty/cups.git/commit
scheduler/job.c: unload job before freeing job history in cupsdDeleteJob() 813/head
authorBryan Mason <bmason@redhat.com>
Fri, 27 Oct 2023 18:37:02 +0000 (11:37 -0700)
committerBryan Mason <bmason@redhat.com>
Fri, 27 Oct 2023 18:37:02 +0000 (11:37 -0700)
commit7781cc73cd69cc6c3eba526ac4851d9604e68d43
tree7d762ea3acb8fec256b963a1ebddcfc9037419aa
parent082c5ae12a72889312452716efed3cf8833e3518
scheduler/job.c: unload job before freeing job history in cupsdDeleteJob()

With "PreserveJobHistory Off", LogLevel not set to debug (or debug2),
and "LogDebugHistory 200" (the default), cupsdDeleteJob() frees the
job history and then unloads the job.  However, unload_job() calls
cupsdLogJob() which re-creates the job history and puts "Unloading..."
into it because level (debug) is greater than LogLevel (warn) and
LogDebugHistory is set to 200 messages by default.  Unused (and
unreachable) job history is left behind, resulting in a memory leak.
scheduler/job.c