]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
scheduler/job.c: unload job before freeing job history in cupsdDeletejob()
authorzdohnal <zdohnal@redhat.com>
Mon, 30 Oct 2023 10:29:52 +0000 (11:29 +0100)
committerGitHub <noreply@github.com>
Mon, 30 Oct 2023 10:29:52 +0000 (11:29 +0100)
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.

The solution seems to be to unload the job before freeing the job history.


Trivial merge