verify malloc success also in xmldate()