convert crlf to lf
fix memory leak