Closed Bug 676180 Opened 9 years ago Closed 9 years ago
memory allocation / deallocation mismatch in toolkit/system/gnome/ns
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 Build ID: 20110622232440 Steps to reproduce: I run cppcheck 1.49 on the latest source, and I found several bugs. This is one of them. Actual results: Memory was allocated with strdup(), and freed with g_free. strdup uses malloc() and that causes a memory allocation/deallocation mismatch. Expected results: g_strdup should be used, as in the attached files you can see.
Comment on attachment 550298 [details] [diff] [review] proposed solution. Thanks! In future patches can you include function names and 8 lines of context, please? Mercurial can be configured to do this automatically as in the diff section here: https://developer.mozilla.org/en/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3f
Attachment #550298 - Flags: review?(karlt) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.