[erlang-patches] cppcheck(1) inspired changes

Christian von Roques <>
Tue Sep 6 20:56:25 CEST 2011

I toyed with cppcheck(1) http://cppcheck.sourceforge.net/
a static analysis tool for C/C++ code.  It warned about several places
in the Erlang sources, but despite its intention to have zero false
positives, not all its findings were caused by real errors in the code.

	git fetch git://github.com/roques/otp.git cppcheck

This branch contains a few changes inspired by cppcheck(1)'s findings,
I don't think any of them are really urgent, but they still are fixes:

 * One potential use of an uninitialized variable when neither ERTS_SMP

 * Not leaving erl_eterm_state locked when malloc(3) fails in

 * Two malloc-leaks in error paths of mn_send_write() and ei_reg_restore().


More information about the erlang-patches mailing list