GNOME Bugzilla – Bug 339365
gnome-cups-icon leak memory
Last modified: 2008-01-29 13:10:14 UTC
gnome-cups-manager 0.31-1.1ubuntu4 gnome-cups-icon leak memmory over time. It happen all the time.
The valgrind report show this. My take is that the response returned by cupsDoFileRequest is not deleted by an ippDelete() ==12726== 4,272 bytes in 89 blocks are definitely lost in loss record 137 of 153 ==12726== at 0x401C422: malloc (vg_replace_malloc.c:149) ==12726== by 0x4BE0FEF: strdup (in /lib/tls/i686/cmov/libc-2.3.6.so) ==12726== by 0x49DB374: (within /usr/lib/libcups.so.2) ==12726== by 0x49DB695: cupsDoFileRequest (in /usr/lib/libcups.so.2) ==12726== by 0x49B8C3B: request_thread_main (gnome-cups-request.c:341) ==12726== by 0x4B09427: (within /usr/lib/libglib-2.0.so.0.1000.2) ==12726== by 0x4B07581: (within /usr/lib/libglib-2.0.so.0.1000.2) ==12726== by 0x4A4A340: start_thread (in /lib/tls/i686/cmov/libpthread-2.3.6.so) ==12726== by 0x4C404ED: clone (in /lib/tls/i686/cmov/libc-2.3.6.so)
Upon start, I get these VSS/RSS values: 19684 1208 After 12 hours, I get: 60564 12404 Definitely.
More info there: http://www.burtonini.com/blog//computers/debugging-20031014
This is Debian bug http://bugs.debian.org/369083 where David Pashley provided another valgrind log and Samuel Mimram came up with a patch which I'll attach here.
Created attachment 68321 [details] [review] Fix for the memory leak
Created attachment 68322 [details] [review] patch to fix the leak. Attached is my version of the patch. The other one is wrong, it is a OR that should be done (I know I did the same mistake ;-) ) Testing it right now, but seems to be good at first sight.
Dear maintainer, let me know if I can commit that patch. thanks.
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.
Moving all gnome-cups-manager bugs to new product. Filter on Kjartan's spring cleaning.