Add more malloc checks in json indent