fix crash in dns code with new stdio locking code