Protect against recursive fprintf/malloc/free calls.