[libvirt] [PATCH 05/14] locking: Resolve resource leak with 'dir' on non error path