diff --git a/src/util/virlease.c b/src/util/virlease.c index b8e9d8be46..910c00346b 100644 --- a/src/util/virlease.c +++ b/src/util/virlease.c @@ -120,7 +120,7 @@ virLeaseReadCustomLeaseFile(virJSONValuePtr leases_array_new, continue; } - if (strchr(ip_tmp, ':')) { + if (server_duid && strchr(ip_tmp, ':')) { /* This is an ipv6 lease */ if ((server_duid_tmp = virJSONValueObjectGetString(lease_tmp, "server-duid"))) {