Fix compilation with clang, work around double free

These patches fix two things

* there is some point in the code that does a double free. As I was not able to fix that, the first patch turns off automatic abortion in case of double free. This fixes bug #1.
* Some functions that are not declared void return without a value. Fix that by returning a dummy value. This makes compilation with clang possible