Fix input pending connect handling
iconn->pending_connect needs to be freed after sending the error reply