Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in libcups.so.2 #6153

Open
chandrakant2023 opened this issue Oct 19, 2023 · 1 comment
Open

Memory leak in libcups.so.2 #6153

chandrakant2023 opened this issue Oct 19, 2023 · 1 comment

Comments

@chandrakant2023
Copy link

Found the memory leak in libcups.so.2, following is the stack from the valgrind,
Any fix is available for Rocky 8 ?

==1065== 789,696 bytes in 3,656 blocks are definitely lost in loss record 18,029 of 18,033
==1065== at 0x4C3CE4B: calloc (vg_replace_malloc.c:1328)
==1065== by 0x4B6A5FA4: cupsArrayNew3 (in /usr/lib64/libcups.so.2)
==1065== by 0x4B6ABD02: ??? (in /usr/lib64/libcups.so.2)
==1065== by 0x4B6AC3E7: cupsGetDests2 (in /usr/lib64/libcups.so.2)
==1065== by 0x4B476924: ??? (in /opt/Qt/plugins/printsupport/libcupsprintersupport.so)
==1065== by 0x4B476AB8: ??? (in /opt/Qt/plugins/printsupport/libcupsprintersupport.so)
==1065== by 0x8374099: QPrinterInfo::defaultPrinterName() (in /opt/Qt/lib/libQt5PrintSupport.so.5.15.7)

============================================

@chandrakant2023
Copy link
Author

Hi Team,
I found the way to mitigate the above stack --
in cups/dest.c in static int cups_enum_dests( ..)
where you return() add free(data.devices)
as you data.devices point to the allocated memory by cupsArrayNew3(..) which we need to free

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant