Fix (two little) bugs found with Cppcheck #2311

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

This branch fixes the following cppcheck[1] warnings:
[benchmark/io.c:60]: (error) Dereferencing 'fd' after it is deallocated / released
[benchmark/io.c:58]: (error) Dereferencing 'fd' after it is deallocated / released
[src/node_crypto.cc:4126]: (error) Memory leak: key

I wasn't all sure about these and cppcheck also reported a lot of warnings for the third-party libraries:
[src/node.cc:2505]: (error) Using sizeof for array given as function argument returns the size of pointer.
[src/node_crypto.cc:3193]: (error) Memory leak: md_value
[src/platform_win32.cc:130]: (error) Mismatching allocation and deallocation: title_w
[src/platform_win32.cc:146]: (error) Mismatching allocation and deallocation: title_w

[1] http://sourceforge.net/projects/cppcheck/

Greetings,
Jonathan Neuschäfer

Owner

bnoordhuis commented Dec 13, 2011

I fixed the PBKDF2 memory leak in d70ef19, turns out the error path was leaking in several places. I can take the other patch though. Can you sign the CLA if you haven't already?

I haven't signed it; do I need to for this little patch?

@neuschaefer Yup. Everyone who contributes code (in any way or amount) needs to.

No, I'm sorry, I won't sign it just for this patch. But I'll give you the information I used in a bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment