apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.85k stars 452 forks source link

Memory leak in function add_banner #6144

Open Hripsime-H opened 8 months ago

Hripsime-H commented 8 months ago

Memory leak in function add_banner. The memory leak is reported by a static analyzer tool developed at CAST (https://www.linkedin.com/company/cast-center).

Specifically, dynamic memories are allocated here and here if cupsArrayAdd fails to add temp here, allocated memories remain not freed. There are similar cases in other functions which use cupsArrayAdd.

ma-ilsi commented 8 months ago

Hmm, this leak is easier to follow than #6145. Anyone from the team seen this? Seems like a memory leak to me.