[libvirt] [PATCH] tests: avoid null pointer dereference