[libvirt] [PATCH] locking: avoid dereferencing a NULL pointer