Closed
Bug 1161666
Opened 9 years ago
Closed 9 years ago
|extract_signature| leaks memory if |sigIndex| > 0 (command line build utility)
Categories
(Toolkit :: Application Update, defect)
Toolkit
Application Update
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: erahm, Assigned: joseriosneto, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: [CID 1293421][lang=c++][good first bug])
Attachments
(1 file)
1.02 KB,
patch
|
robert.strong.bugs
:
review+
|
Details | Diff | Splinter Review |
Coverity reports that |mar_read_entire_file| leaks the previous allocation of |extractedSignature| [1] on each iteration of the for loop. [1] https://hg.mozilla.org/mozilla-central/annotate/754579ec0e68/modules/libmar/sign/mar_sign.c#l550
Updated•9 years ago
|
Summary: |extract_signature| leaks memory if |sigIndex| > 0 → |extract_signature| leaks memory if |sigIndex| > 0 (command line build utility)
Reporter | ||
Updated•9 years ago
|
Mentor: erahm
Whiteboard: [CID 1293421] → [CID 1293421][lang=c++][good first bug]
Comment 2•9 years ago
|
||
Hi José, feel free to take this bug. Thanks!
Robert, here's a first patch for the problem. I tried to avoid another condition after fread and added a comment for readability.
Attachment #8602478 -
Flags: review?(robert.strong.bugs)
Comment 4•9 years ago
|
||
Comment on attachment 8602478 [details] [diff] [review] bug1161666_fix_leak_v1.patch Works for me since calling free on NULL is safe. Thanks again!
Attachment #8602478 -
Flags: review?(robert.strong.bugs) → review+
Comment 5•9 years ago
|
||
Since the trees are closed I'll probably land this and your other patch tomorrow.
Assignee: nobody → joseriosneto
Updated•9 years ago
|
Flags: in-testsuite-
Target Milestone: --- → mozilla40
Updated•9 years ago
|
Mentor: robert.strong.bugs
Updated•6 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•