This branch fixes the following cppcheck 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
benchmark/io: move close after fsync
node_crypto: fix a subtle mem leak in error path
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.