Fix minor socket descriptor leak found by Coverity.