Closed Bug 676184 Opened 13 years ago Closed 13 years ago

memory leaks in xpcom/typelib/xpidl/xpidl_idl.c

Categories

(Firefox :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 608314

People

(Reporter: david.volgyes, Unassigned)

References

Details

Attachments

(1 file)

Attached patch proposed solution. (deleted) — Splinter Review
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 and found several memory leak in the code. Actual results: xpcom/typelib/xpidl/xpidl_idl.c line 183: memory is allocated with "realloc" for buffer, but if error happens, then this memory region is not freed. (in original code: if (ferror(inputfile)) return NULL; ) Expected results: Memory should be released with free(). I attached a proposed diff.
Actually, I have just noticed that someone else also reported this bug as #608314 in last December, but the bug is still unconfirmed. Someone who has write access to the code should handle one of the two bugs, and close them after.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Blocks: cppcheck
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: