diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c index cef9ae5fee14732205857902b74e0262e74e2a5d..ae55086d17d27a8a631aa16db85f89da9068563d 100644 --- a/tests/qemuagenttest.c +++ b/tests/qemuagenttest.c @@ -1127,7 +1127,9 @@ checkUserInfo(virTypedParameterPtr params, snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH, "user.%zu.domain", nth); - virTypedParamsGetString(params, nparams, param_name, &domain); + if (virTypedParamsGetString(params, nparams, param_name, &domain) < 0) + return -1; + if (STRNEQ_NULLABLE(expDomain, domain)) { virReportError(VIR_ERR_INTERNAL_ERROR, "Expected domain '%s', got '%s'",