Fix memory leak on EGAIN etc