| Summary: | Memory leak into CUPS IPP processing function addStringList_p() | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Roman Savochenko <rom_as> |
| Component: | tdelibs | Assignee: | Timothy Pearson <kb9vqf> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | bugwatch, darrella, kb9vqf, slavek.banko |
| Priority: | P5 | ||
| Version: | 3.5.13 [Trinity] | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Attachments: |
Memory leak fix patch
memoryleak.patch |
||
I tested the patch with v3.5.13-sru branch and causes FTBFS: /tmp/buildd/kdelibs-trinity-3.5.13/kdeprint/cups/ipprequest.cpp: In member function 'void IppRequest::addStringList_p(int, int, const QString&, const QStringList&)': /tmp/buildd/kdelibs-trinity-3.5.13/kdeprint/cups/ipprequest.cpp:242:54: error: cast from 'const char*' to 'int' loses precision [-fpermissive] Tested on Debian Wheezy (cups 1.5.3) and Ubuntu Quantal (cups 1.6.1) - on both the same crash. Created attachment 1072 [details]
memoryleak.patch
Correct patch for x86 and x86_64.
Great. The new patch is fine - not causing FTBFS. I'll do a basic tests before pushing it to GIT. Fixed in GIT hash 5f99a271. (In reply to comment #4) > Fixed in GIT hash 5f99a271. Did you commit this to the R14 development tree? I don't see it in the tdebase logs... Thanks! Tim (Odpověď na komentář #5) > (In reply to comment #4) > > Fixed in GIT hash 5f99a271. > > Did you commit this to the R14 development tree? I don't see it in the tdebase > logs... > > Thanks! > > Tim Yes, of course. Commit relates to tdelibs: http://git.trinitydesktop.org/cgit/tdelibs/commit/?id=5f99a2718025c4f2fbef86a450423a9c61e297f9 And I also backported into v3.5.13-sru branch... http://git.trinitydesktop.org/cgit/tdelibs/commit/?h=origin/v3.5.13-sru&id=bb2a1e349f302299e394ff86f27be3df41f08fb3 OK, thanks. I need to find out why the top level GIT tree is not currently updating... (Odpověď na komentář #7)
> OK, thanks. I need to find out why the top level GIT tree is not currently
> updating...
...and also "patches" web page is not updated.
|
Created attachment 1060 [details] Memory leak fix patch The problem has detected on working KJobViewer into system tray all time. And for about ten printers after 10 hours KJobViewer consume about 120 MB (but start from 15MB). The memory leak place has been detected by ValGrind aid. Study of the problem shown incorrect placing IPP string attributes into function IppRequest::addStringList_p(). For HAVE_CUPS_1_6 allocated memory by strdup() is not freed by dubling allocation memory into ippSetString() and for < HAVE_CUPS_1_6 is not freed by allocation ommit CUPS infrastructure. More correct will send values list direct to function ippAddStrings() last argument. Also I think will better make like fix for left functions IppRequest::addIntegerList_p() and IppRequest::addBoolean(). Patch for fix the memory leak included!