#5074 closed Bug report (fixed)
Some memory leaks
Reported by: | silamantex | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | FileZilla Server |
Keywords: | 0.9.33 | Cc: | eyebex@… |
Component version: | Operating system type: | Windows | |
Operating system version: |
Description
Hi,
Have you tried cppcheck?
http://sourceforge.net/projects/cppcheck/
FileZilla Server\source\interface\misc\md5.cpp:252]: (error) Memory leak: s
FileZilla Server\source\interface\misc\md5.cpp:269]: (error) Memory leak: s
FileZilla Server\source\interface\misc\MarkupSTL.cpp:136]: (error) Mismatching allocation and deallocation: pBuffer
FileZilla Server\source\misc\MarkupSTL.cpp:145]: (error) Mismatching allocation and deallocation: pBuffer
FileZilla Server\source\misc\md5.cpp:261]: (error) Memory leak: s
FileZilla Server\source\misc\md5.cpp:278]: (error) Memory leak: s
Good luck
Attachments (1)
Change History (7)
comment:1 by , 15 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
by , 15 years ago
Attachment: | FZS-FixMD5MemLeak.patch added |
---|
comment:2 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Sorry, I should not set this to fixed until the patch is applied / accepted.
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:4 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
While your changes seem to address false positives reported by cppcheck and / or the VS static code analyzer, they do not seem to address the issue I've found manually (and submitted the patch for): IMHO the char array "s" allocated by hex_digest() still does not get freed if used in "operator<<". If I'm wrong, please elaborate and close again. Thank you!
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Then, through manual analysis, you should have noticed that all those leaks are in dead third-party code that isn't even used.
Please double-check such automated findings before posting them here. Most of the above mentioned code is OK and has no leaks: The memory allocated in those functions gets properly deleted by the caller. However, I believe there's a leak in md5.cpp itself, see the attached patch.