windows: fix buffer leak after failed udp send

Ref: #1426