diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index befa8d2448..1ef9b8d606 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -124,7 +124,7 @@ virshAddressParse(const char *str, g_autofree char *type = g_strdup(str); char *a = strchr(type, ':'); - if (!addr) + if (!a) return -1; *a = '\0';