fixed malloc and doxygen comments