Don't cast to void pointer in safe_free

This has been generating some warnings with mingw-gcc, and it makes no sense
at all to cast to void a pointer, otherwise no static checks from the compiler
can be used.