diff --git a/tests/securityselinuxlabeltest.c b/tests/securityselinuxlabeltest.c index e98d9bb81c..1178acfecc 100644 --- a/tests/securityselinuxlabeltest.c +++ b/tests/securityselinuxlabeltest.c @@ -331,10 +331,8 @@ testSELinuxLabeling(const void *opaque) VIR_FREE(files[i].context); } VIR_FREE(files); - if (ret < 0) { - virErrorPtr err = virGetLastError(); - VIR_TEST_VERBOSE("%s\n", err ? err->message : ""); - } + if (ret < 0) + VIR_TEST_VERBOSE("%s\n", virGetLastErrorMessage()); return ret; }