[libvirt] [PATCH RESEND] command: avoid fd leak on failure