diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c index 95b527436851571fbb8c2de8df7d93197b5cceee..31a740cb89898cb91e65f8942a3357de73473b3d 100644 --- a/src/util/virsocketaddr.c +++ b/src/util/virsocketaddr.c @@ -107,7 +107,8 @@ virSocketAddrParseInternal(struct addrinfo **res, int err; if (val == NULL) { - virReportError(VIR_ERR_INVALID_ARG, "%s", _("Missing address")); + if (reportError) + virReportError(VIR_ERR_INVALID_ARG, "%s", _("Missing address")); return -1; }